Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 616cef19e5fa376ee6a4d8e63fe53e3a00483044685037658d3a5e8bb5be34f3
Ticket: 3183016fffffffffffffffffffffffffffffffff
cd .. from link in Windows confuses Tcl
User & Date: serhiy.storchaka on 2026-10-19 18:44:30
Changes

  1. foundin changed to: "8.6.18, 9.0.5, 9.1.0"
  2. icomment:
    Still present on Windows 11 with 8.5.19 to 9.1: after <tt>cd test1/test2/link; cd ..</tt> with a junction to test1, <nowiki>[pwd]</nowiki> and <nowiki>[glob]</nowiki> show the parent of test1, while <nowiki>[file exists]</nowiki>, <nowiki>[open]</nowiki> and <tt>cmd /c cd</tt> use test2. Tcl resolves ".." physically after the link, but Windows itself resolves it lexically.
    
    Proposed fix in branch [/timeline?r=normalize-dotdot-after-link|normalize-dotdot-after-link]: on Windows ".." is resolved lexically, as the system does (and as Python's ntpath.realpath() does), so all of them agree on test2; links elsewhere in the path are still resolved. This works for junctions and for <tt>mklink /D</tt> symbolic links, absolute or relative. Potential incompatibility: <nowiki>[file normalize junction/..]</nowiki> is now the parent of the junction, not of its target; filesystem-1.26 and 1.28 are changed accordingly. On Unix ".." stays physical, and a trailing ".." after a relative link is now resolved ([3577801fff]). Tests winFile-6.1, 6.2 and filesystem-1.57.
    
  3. login: "serhiy.storchaka"
  4. mimetype: "text/x-fossil-wiki"