Skip to content

Commit

Permalink
Use sage_ prefix for the main temporary directory.
Browse files Browse the repository at this point in the history
  • Loading branch information
tornaria committed Dec 26, 2024
1 parent dbe07ff commit 17f7008
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/sage/misc/temporary_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@
# as the parent for all temporary files & directories created by them.
# This lets us clean up after those two functions when sage exits normally
# using an atexit hook
TMP_DIR_FILENAME_BASE = tempfile.TemporaryDirectory()
# Note that `TemporaryDirectory()` will cleanup on program exit;
# we keep the atexit hook to be redundant, in case that fails.
TMP_DIR_FILENAME_BASE = tempfile.TemporaryDirectory(prefix='sage_')
atexit.register(lambda: TMP_DIR_FILENAME_BASE.cleanup())


Expand Down

0 comments on commit 17f7008

Please sign in to comment.