Tcl Source Code

View Ticket
Login
Ticket UUID: 59cc110ff64230dcf74e9e580e4de4d7dc491317
Title: file temp dir on Windows inserts unnecessary backslash
Type: Bug Created on: 2026-06-19 16:58:55
Submitter: apnadkarni Assigned to: nobody
Subsystem: - New Builtin Commands Severity: Minor
Priority: 5 Medium Last modified: 2026-07-04 08:28:20
Status: Closed Closed by: apnadkarni
Resolution: Fixed Closed on: 2026-07-04 08:28:20
Version:
Description:
Reported by JulianNoble on the chat


```
% file tempdir d:/temp
d:/\temp_T9871BSL
% file tempdir d:/temp/xxxx
d:/temp\xxxx_SL8T0ZI5
% file tempdir d:/temp/xxxx/
d:/temp/xxxx/\tcl_SHEC8XCI

```
User Comments:
apnadkarni added on 2026-07-02 03:35:51:

Related to this was also the suggestion that tempdir should return "canonical" (forward slashes) paths on Windows, not backslashed ones as the combined / and look strange and backslashes can also confuse glob which treats them as escape characters.


apnadkarni added on 2026-07-04 08:28:20:
Fixed in [4ff75991].