Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTon Roosendaal <ton@blender.org>2005-12-12 01:03:04 +0300
committerTon Roosendaal <ton@blender.org>2005-12-12 01:03:04 +0300
commite58eecbea567bc21edf36d65edb07fc44c9ee439 (patch)
tree92c24e103c34312c3ea8f511b8f6ae03b47e2dc0 /source/blender/blenlib
parente0d20e00ce7860a47a5b57b036ceadbe16b79e15 (diff)
Fix: reading library files with option "Relative Paths" set, whilst library
was read already AND relative, caused the path for libraries to corrupt... Error caused big headaches in studio Orange... :)
Diffstat (limited to 'source/blender/blenlib')
-rw-r--r--source/blender/blenlib/intern/util.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/source/blender/blenlib/intern/util.c b/source/blender/blenlib/intern/util.c
index 62aa663409e..74e8e575fda 100644
--- a/source/blender/blenlib/intern/util.c
+++ b/source/blender/blenlib/intern/util.c
@@ -437,11 +437,14 @@ void BLI_makestringcode(const char *relfile, char *file)
char * q;
char * lslash;
int len=0;
-
char temp[FILE_MAXDIR+FILE_MAXFILE];
char res[FILE_MAXDIR+FILE_MAXFILE];
+
+ /* if file is already relative, bail out */
+ if(file[0]=='/' && file[1]=='/') return;
+
strcpy(temp, relfile);
-
+
#ifdef WIN32
if (strlen(file) > 2) {
if ( temp[1] == ':' && file[1] == ':' && temp[0] != file[0] )