Fix T42588: Absolute paths not cleaned on win32

Making paths absolute would leave in "\..\" part on windows.
This commit is contained in:
Campbell Barton 2014-12-01 16:01:08 +01:00
parent 7d88f0ce4d
commit 72f75927f5

@ -939,8 +939,6 @@ bool BLI_path_abs(char *path, const char *basepath)
BLI_strncpy(path, tmp, FILE_MAX); BLI_strncpy(path, tmp, FILE_MAX);
} }
BLI_cleanup_path(NULL, path);
#ifdef WIN32 #ifdef WIN32
/* skip first two chars, which in case of /* skip first two chars, which in case of
* absolute path will be drive:/blabla and * absolute path will be drive:/blabla and
@ -951,6 +949,9 @@ bool BLI_path_abs(char *path, const char *basepath)
BLI_char_switch(path + 2, '/', '\\'); BLI_char_switch(path + 2, '/', '\\');
#endif #endif
/* ensure this is after correcting for path switch */
BLI_cleanup_path(NULL, path);
return wasrelative; return wasrelative;
} }