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
path: root/source
diff options
context:
space:
mode:
authorBastien Montagne <montagne29@wanadoo.fr>2015-11-27 23:12:42 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2015-11-27 23:18:06 +0300
commitbab8deef171ab3cbc2f9e43372d8314bd6a5ff5b (patch)
treec5ffa57173c4d1a419a28b77920a842b5f254936 /source
parent85362dfe807afc28ff51d8d467c317f91ab04efa (diff)
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!
Diffstat (limited to 'source')
-rw-r--r--source/blender/blenlib/intern/path_util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/blenlib/intern/path_util.c b/source/blender/blenlib/intern/path_util.c
index 99e512475bb..fadfb64f1e1 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';
}