Commit: bab8deef171ab3cbc2f9e43372d8314bd6a5ff5b
Author: Bastien Montagne
Date:   Fri Nov 27 21:12:42 2015 +0100
Branches: master
https://developer.blender.org/rBbab8deef171ab3cbc2f9e43372d8314bd6a5ff5b

Fix (unreported) broken BLI_join_dirfile() in some cases on Windows.

That function was epic failing in case trying to join '//' and 'foo.blend', 
would
give '//\foo.blend'... Now check for both SEP and ALTSEP!

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

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 99e5124..fadfb64 100644
--- a/source/blender/blenlib/intern/path_util.c
+++ b/source/blender/blenlib/intern/path_util.c
@@ -1761,7 +1761,7 @@ void BLI_join_dirfile(char *__restrict dst, const size_t 
maxlen, const char *__r
        }
 
        /* inline BLI_add_slash */
-       if ((dirlen > 0) && (dst[dirlen - 1] != SEP)) {
+       if ((dirlen > 0) && !ELEM(dst[dirlen - 1], SEP, ALTSEP)) {
                dst[dirlen++] = SEP;
                dst[dirlen] = '\0';
        }

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

Reply via email to