diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2015-11-27 23:12:42 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2015-11-27 23:18:06 +0300 |
commit | bab8deef171ab3cbc2f9e43372d8314bd6a5ff5b (patch) | |
tree | c5ffa57173c4d1a419a28b77920a842b5f254936 /source/blender/blenlib/intern/path_util.c | |
parent | 85362dfe807afc28ff51d8d467c317f91ab04efa (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/blender/blenlib/intern/path_util.c')
-rw-r--r-- | source/blender/blenlib/intern/path_util.c | 2 |
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'; } |