Search /tmp before /var/tmp and /usr/tmp -- this seems preferred.

SF patch #404564, Gregor Hoffleit.
This commit is contained in:
Guido van Rossum 2001-03-02 05:51:16 +00:00
parent 4eb0c003f8
commit 7dcf84f2f8

View file

@ -21,7 +21,7 @@ def gettempdir():
pwd = os.getcwd() pwd = os.getcwd()
except (AttributeError, os.error): except (AttributeError, os.error):
pwd = os.curdir pwd = os.curdir
attempdirs = ['/var/tmp', '/usr/tmp', '/tmp', pwd] attempdirs = ['/tmp', '/var/tmp', '/usr/tmp', pwd]
if os.name == 'nt': if os.name == 'nt':
attempdirs.insert(0, 'C:\\TEMP') attempdirs.insert(0, 'C:\\TEMP')
attempdirs.insert(0, '\\TEMP') attempdirs.insert(0, '\\TEMP')