Skip to content
Tcl Source Code History Of Ticket 3577801
Login

History Of Ticket 3577801

Artifacts Associated With Ticket 3577801

  1. Ticket change [335faa2c25] (rid 106585) by zoro2 on 2012-10-17 09:28:35:

    1. assignee initialized to: "vincentdarley"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      Happend using latest Tcl 8.6b3 and 8.5.12. Code to reproduce (on Ubuntu Linux, ext3, but I doubt it matters).
      
      set d [file join [file dirname [info script]] test]
      catch {file delete -force $d}
      file mkdir $d/d
      
      close [open $d/f w]
      close [open $d/d/f2 w]
      
      exec ln -s f2 $d/d/l2
      exec ln -s ../f $d/d/l
      
      puts [vfs::filesystem fullynormalize $d/f]
      puts [vfs::filesystem fullynormalize $d/d/l]
      puts [vfs::filesystem fullynormalize $d/d/l2]
      
      
    4. foundin initialized to: "obsolete: 8.6b3"
    5. is_private initialized to: "0"
    6. priority initialized to: "5 Medium"
    7. resolution initialized to: "None"
    8. status initialized to: "Open"
    9. submitter initialized to: "zoro2"
    10. subsystem initialized to: "37. File System"
    11. title initialized to:
      Issue with [file normalize] on Linux with symlink wtih ".."
      
    12. type initialized to: "Bug"
  2. Ticket change [f60a183cd5] (rid 130223) by zoro2 on 2012-10-17 18:50:04:

    1. icomment:
      I have updated the script to show that the issue is with [file normalize] itself:
      
      set d [file join [file dirname [info script]] test]
      catch {file delete -force $d}
      file mkdir $d/d
      
      close [open $d/f w]
      close [open $d/d/f2 w]
      
      exec ln -s f2 $d/d/l2
      exec ln -s ../f $d/d/l
      
      puts [vfs::filesystem fullynormalize $d/f]
      puts [file normalize $d/f]
      
      puts ""
      puts [vfs::filesystem fullynormalize $d/d/l]
      # the first one returns test/d/f; second reports test/f
      puts [file normalize $d/d/l/../../f]
      puts [file normalize $d/d/l2/../../f]
      
      puts ""
      puts [vfs::filesystem fullynormalize $d/d/l2]
      # the first one returns test/f2; second reports test/d/f2
      puts [file normalize $d/d/l/../f2]
      puts [file normalize $d/d/l2/../f2]
      
      
      
    2. login: "zoro2"
    3. mimetype: "text/plain"
    4. username: "zoro2"
  3. Ticket change [3ceff08624] (rid 120998) by dgp on 2012-10-17 19:31:25:

    1. assignee changed to: "dgp"
  4. Ticket change [36b590b922] (rid 259327) by serhiy.storchaka on 2026-10-19 18:44:30:

    1. foundin changed to: "8.6.18, 9.0.5, 9.1.0"
    2. icomment:
      Still present in 8.6, 9.0 and 9.1: when ".." follows a link, the link target is used literally, so ".." or "." in the target, a trailing "/" or a chain of links give a wrong result (<tt>d/l/..</tt> with <tt>l -> ../x</tt> gives <tt>d/..</tt>).
      
      Proposed fix in branch [/timeline?r=normalize-dotdot-after-link|normalize-dotdot-after-link], together with [3570244fff], [3183016fff] and [3099612fff]: on Unix the link target is normalized and further links are followed before backing up, so the results agree with realpath(). Tests filesystem-1.55 to 1.58. The last component of a path is still not resolved, as documented.
      
    3. login: "serhiy.storchaka"
    4. mimetype: "text/x-fossil-wiki"