Move copying of %TEMP% to U.tempdir after slash adding. Otherwise path is handled wrong when opening filebrowser for it.

This commit is contained in:
Nathan Letwory
2010-09-28 00:14:02 +00:00
parent ad1604e840
commit 8ca75a36a0

View File

@@ -1632,7 +1632,6 @@ void BLI_where_is_temp(char *fullname, int usertemp)
char *tmp = getenv("TEMP"); /* Windows */
if (tmp && BLI_is_dir(tmp)) {
strcpy(fullname, tmp);
strcpy(U.tempdir, fullname); /* also set user pref to show %TEMP%. /tmp/ is just plain confusing for Windows users. */
}
}
#else
@@ -1657,6 +1656,9 @@ void BLI_where_is_temp(char *fullname, int usertemp)
} else {
/* add a trailing slash if needed */
BLI_add_slash(fullname);
#ifdef WIN32
strcpy(U.tempdir, fullname); /* also set user pref to show %TEMP%. /tmp/ is just plain confusing for Windows users. */
#endif
}
}