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!
This commit is contained in:
Bastien Montagne 2015-11-27 21:12:42 +01:00
parent 85362dfe80
commit bab8deef17
1 changed files with 1 additions and 1 deletions

View File

@ -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';
}