diff options
author | Campbell Barton <ideasman42@gmail.com> | 2014-12-01 18:01:08 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2014-12-01 18:01:08 +0300 |
commit | 72f75927f5079e72e45019899bdea384447d5992 (patch) | |
tree | 85a4d59b2d24a74db90ed45ad64cf37c6305e350 /source/blender/blenlib/intern/path_util.c | |
parent | 7d88f0ce4d2184ad7ee51c01babce4a76935de75 (diff) |
Fix T42588: Absolute paths not cleaned on win32
Making paths absolute would leave in "\..\" part on windows.
Diffstat (limited to 'source/blender/blenlib/intern/path_util.c')
-rw-r--r-- | source/blender/blenlib/intern/path_util.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/source/blender/blenlib/intern/path_util.c b/source/blender/blenlib/intern/path_util.c index 49af04626c3..abb6cc3f3cd 100644 --- a/source/blender/blenlib/intern/path_util.c +++ b/source/blender/blenlib/intern/path_util.c @@ -939,8 +939,6 @@ bool BLI_path_abs(char *path, const char *basepath) BLI_strncpy(path, tmp, FILE_MAX); } - BLI_cleanup_path(NULL, path); - #ifdef WIN32 /* skip first two chars, which in case of * absolute path will be drive:/blabla and @@ -950,7 +948,10 @@ bool BLI_path_abs(char *path, const char *basepath) */ BLI_char_switch(path + 2, '/', '\\'); #endif - + + /* ensure this is after correcting for path switch */ + BLI_cleanup_path(NULL, path); + return wasrelative; } |