Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2023-09-14
16:44 • New ticket [29b19f5ef0] Inconsistencies in zipfs path separator on Windows. artifact: 00fec31893 user: apnadkarni

Inconsistencies in zipfs path separator on Windows

Open29b19f5ef0ccab7cbe8debabd5c9b246ae4cd444Created 3 years agoUpdated 3 years ago
Descriptionmarkdown2023-09-14 16:44:35

It is not clear whether paths within zipfs mounts can use backslashes as the path separator on Windows. Examples:

% file exists //zipfs:/mt/testdir/test2
1
% file exists //zipfs:/mt\\testdir\\test2
0
% file exists //zipfs:\\mt\\testdir\\test2
1
% file exists //zipfs:\\mt/testdir/test2
1

It appears backslashes are allowed only if the first path separator after the prefix is a backslash. This is not consistent with other Tcl commands on Windows where backslashes are separators everywhere. Alternatively, if zipfs is to be treated as a different file system where only / is a separator, that would be ok too in my mind as long as that is enforced for the first separator as well.

On a related and somewhat contradictory note, the zipfs code treats paths beginning with \ as UNC paths but not paths beginning with //.

Log in (anonymous is fine) to add a comment.