forked from bartvdbraak/blender
Fix T41891: Alt+S can't save image
win32 BLI_path_abs expanded empty strings into "C:\\", which made BLI_exists succeed (quite confusing). Now match behavior on *nix.
This commit is contained in:
parent
c9a7789bcf
commit
f6db580041
@ -873,9 +873,12 @@ bool BLI_path_abs(char *path, const char *basepath)
|
||||
char tmp[FILE_MAX];
|
||||
char base[FILE_MAX];
|
||||
#ifdef WIN32
|
||||
char vol[3] = {'\0', '\0', '\0'};
|
||||
|
||||
BLI_strncpy(vol, path, 3);
|
||||
/* without this: "" --> "C:\" */
|
||||
if (*path == '\0') {
|
||||
return wasrelative;
|
||||
}
|
||||
|
||||
/* we are checking here if we have an absolute path that is not in the current
|
||||
* blend file as a lib main - we are basically checking for the case that a
|
||||
* UNIX root '/' is passed.
|
||||
|
Loading…
Reference in New Issue
Block a user