Core: remove use of the environment variable TMP on Unix
This isn't a standard and seems only to be included for historic reasons. Ref !144100
This commit is contained in:
@@ -62,8 +62,6 @@ void BLI_temp_directory_path_get(char *tempdir, const size_t tempdir_maxncpy)
|
||||
#ifdef WIN32
|
||||
"TEMP",
|
||||
#else
|
||||
/* Non standard (could be removed). */
|
||||
"TMP",
|
||||
/* Posix standard. */
|
||||
"TMPDIR",
|
||||
#endif
|
||||
|
||||
@@ -874,7 +874,6 @@ static void print_help(bArgs *ba, bool all)
|
||||
PRINT(" $TEMP Store temporary files here (MS-Windows).\n");
|
||||
}
|
||||
if (!defs.win32 || all) {
|
||||
/* NOTE: while `TMP` checked, don't include here as it's non-standard & may be removed. */
|
||||
PRINT(" $TMPDIR Store temporary files here (UNIX Systems).\n");
|
||||
}
|
||||
PRINT(
|
||||
|
||||
@@ -37,10 +37,6 @@ import tempfile
|
||||
is_win32 = os.name == "nt"
|
||||
TEMP_ENV = "TEMP" if is_win32 else "TMPDIR"
|
||||
|
||||
# TODO: remove this. Since it's checked, it must be removed!
|
||||
if os.environ.get("TMP") is not None:
|
||||
del os.environ["TMP"]
|
||||
|
||||
|
||||
def system_temp_set(path: str) -> None:
|
||||
os.environ[TEMP_ENV] = path
|
||||
|
||||
Reference in New Issue
Block a user