Tcl Library Source Code

View Ticket
Login
Ticket UUID: 2359926
Title: fileutil::tempdir on windows
Type: RFE Version: None
Submitter: nobody Created on: 2008-11-29 21:39:02
Subsystem: fileutil Assigned To: nobody
Priority: 5 Medium Severity:
Status: Open Last Modified: 2008-11-29 21:39:02
Resolution: Closed By:
    Closed on:
Description:
As the manual states, on windows, the following locations are checked in step 5 of the process in determining the location for temp files:
"...C:\TEMP, C:\TMP, \TEMP, and \TMP are tried in that order..."
I think, usually there are no such dirs on windows. If a process runs without a logged on user (in the system context), the directiory usually is %systemroot%\temp (which is c:\windows\temp or c:\winnt\temp, e.g.), otherwise, the temp dir is normally somewhere in the current user's profile path, to where the TMP-Var points. In generall, it's not 100% safe to rely on environment variables - I think it would be more foolproof to ask the system via API call about the right location...