Commit: 72f75927f5079e72e45019899bdea384447d5992
Author: Campbell Barton
Date:   Mon Dec 1 16:01:08 2014 +0100
Branches: master
https://developer.blender.org/rB72f75927f5079e72e45019899bdea384447d5992

Fix T42588: Absolute paths not cleaned on win32

Making paths absolute would leave in "\..\" part on windows.

===================================================================

M       source/blender/blenlib/intern/path_util.c

===================================================================

diff --git a/source/blender/blenlib/intern/path_util.c 
b/source/blender/blenlib/intern/path_util.c
index 49af046..abb6cc3 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;
 }

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to