Fix: Relative "Temporary Files" preference cause trouble (can crash) #118856
|
@ -1121,7 +1121,7 @@ static void where_is_temp(char *tempdir, const size_t tempdir_maxncpy, const cha
|
|||
|
||||
tempdir[0] = '\0';
|
||||
|
||||
if (userdir && userdir[0] != '\0' && BLI_is_dir(userdir)) {
|
||||
if (userdir && userdir[0] != '\0' && BLI_is_dir(userdir) && !BLI_path_is_rel(userdir)) {
|
||||
|
||||
BLI_strncpy(tempdir, userdir, tempdir_maxncpy);
|
||||
/* Add a trailing slash if needed. */
|
||||
BLI_path_slash_ensure(tempdir, tempdir_maxncpy);
|
||||
|
|
Loading…
Reference in New Issue
This check should be added to
BLI_temp_directory_path_get
where "//" values could be passed in via environment variables.