Tcl Source Code

View Ticket
Login
Ticket UUID: 3185623
Title: Tcl treatment of ".." as path separator differs from Windows
Type: Bug Created on: 2011-02-18 08:58:02
Submitter: apnadkarni Assigned to: dgp
Subsystem: 36. Pathname Management Severity:
Priority: 5 Medium Last modified: 2011-08-25 22:20:57
Status: Open Closed by:
Resolution: None Closed on:
Version: None
Description:
While debugging a related bug - 3185609 - I discovered the following issue. 

Windows treats path components containing only "." differently from Tcl. If a path component contains more than 2 dots, Windows treats this the same as a single "." so c:/foo/bar/...  (three dots in last component), is the same as c:/foo/bar/.  

Tcl, on the other hand, treats the path as a valid path with the tail being "...". This is what gets cached as the "normalized path" in various fields in the FSPathObj.

Not sure what the external ramifications are (for example, code that compares paths after normalization would not result the same result as Windows) and it's a corner case anyways (Only happened to type in ... instead of .. by mistake) but just recording this inconsistency in case there might be bigger ramifications (security?) that I haven't thought of.
User Comments:
apnadkarni added on 2011-08-25 22:20:56:
Reassigned as per instruction from dgp