From e58eecbea567bc21edf36d65edb07fc44c9ee439 Mon Sep 17 00:00:00 2001 From: Ton Roosendaal Date: Sun, 11 Dec 2005 22:03:04 +0000 Subject: 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... :) --- source/blender/blenlib/intern/util.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'source/blender/blenlib') 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] ) -- cgit v1.2.3