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:
Campbell Barton
2025-08-07 08:02:41 +10:00
parent 9fcdf4822a
commit b07a1adf04
3 changed files with 0 additions and 7 deletions

View File

@@ -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

View File

@@ -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(

View File

@@ -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