From: SourceForge.net <no...@so...> - 2008-12-04 17:47:18
|
Bugs item #2385549, was opened at 2008-12-03 19:29 Message generated for change (Settings changed) made by dgp You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110894&aid=2385549&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.6a4 >Status: Closed >Resolution: Fixed Priority: 9 Private: No Submitted By: Don Porter (dgp) Assigned to: Don Porter (dgp) Summary: [file normalize] can't handle all "path" intreps Initial Comment: % file normalize dltest/.. /home/dgp/cvs/tcl/unix % lindex [glob -types hidden dltest/..] 0 dltest/.. % file normalize [lindex [glob -types hidden dltest/..] 0] /home/dgp/cvs/tcl/unix/dltest/.. The same string value gets treated differently due to different intrep history. Fundamentally this is a flaw in Tcl_FSGetNormalizedPath(), and is the underlying cause of Bug 2378350 in the tclvfs project. ---------------------------------------------------------------------- >Comment By: Don Porter (dgp) Date: 2008-12-04 12:47 Message: Fixes committed for 8.4.20, 8.5.6, and 8.6b1 ---------------------------------------------------------------------- Comment By: Don Porter (dgp) Date: 2008-12-03 20:04 Message: With the archeology aside, the fact of intrep-dependent behavior is unquestionably a bug, but doesn't answer which is correct. I'll proceed on the assumption that supressing the /../ is the aim, but that may well run against the expectations of yet something else. This whole section of code is an inconsistent mess. ---------------------------------------------------------------------- Comment By: Don Porter (dgp) Date: 2008-12-03 20:02 Message: Patch 682500 introduced this bug when it was committed for Tcl 8.4.2 on 2003-02-10. ---------------------------------------------------------------------- Comment By: Don Porter (dgp) Date: 2008-12-03 19:46 Message: Here's the corrected demo to show the flaw on 8.4.19+ as well: % file normalize dltest/.. /home/dgp/cvs/tcl8.4/unix % lindex [glob -type hidden dltest/*] 1 dltest/.. % file normalize [lindex [glob -type hidden dltest/*] 1] /home/dgp/cvs/tcl8.4/unix/dltest/.. % info patch 8.4.19 ---------------------------------------------------------------------- Comment By: Don Porter (dgp) Date: 2008-12-03 19:30 Message: This same bug is present in all active branches, 8.4, 8.5, 8.6, but is more serious in 8.5+ because the troublesome intrep is more widely used. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110894&aid=2385549&group_id=10894 |