Artifacts Associated With Ticket 3577801
Ticket change [335faa2c25] (rid 106585) by zoro2 on 2012-10-17 09:28:35:
- assignee initialized to: "vincentdarley"
- cmimetype initialized to: "text/plain"
- 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] - foundin initialized to: "obsolete: 8.6b3"
- is_private initialized to: "0"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "zoro2"
- subsystem initialized to: "37. File System"
- title initialized to:
Issue with [file normalize] on Linux with symlink wtih ".."
- type initialized to: "Bug"
Ticket change [f60a183cd5] (rid 130223) by zoro2 on 2012-10-17 18:50:04:
- 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] - login: "zoro2"
- mimetype: "text/plain"
- username: "zoro2"
- icomment:
Ticket change [3ceff08624] (rid 120998) by dgp on 2012-10-17 19:31:25:
- assignee changed to: "dgp"
Ticket change [36b590b922] (rid 259327) by serhiy.storchaka on 2026-10-19 18:44:30:
- foundin changed to: "8.6.18, 9.0.5, 9.1.0"
- 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.
- login: "serhiy.storchaka"
- mimetype: "text/x-fossil-wiki"