From: SourceForge.net <no...@so...> - 2012-10-17 11:50:05
|
Bugs item #3577801, was opened at 2012-10-17 02:28 Message generated for change (Comment added) made by zoro2 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110894&aid=3577801&group_id=10894 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: 37. File System Group: development: 8.6b3 Status: Open Resolution: None Priority: 5 Private: No Submitted By: Wojciech Kocjan (zoro2) Assigned to: Vince Darley (vincentdarley) Summary: Issue with [file normalize] on Linux with symlink wtih ".." Initial Comment: 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] ---------------------------------------------------------------------- >Comment By: Wojciech Kocjan (zoro2) Date: 2012-10-17 04:50 Message: 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] ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110894&aid=3577801&group_id=10894 |