Artifacts Associated With Ticket 535621ffffffffffffffffffffffffffffffffff
Ticket change [60e65b5009] (rid 92149) by dgp on 2002-03-27 08:00:10:
- assignee initialized to: "vincentdarley"
- cmimetype initialized to: "text/plain"
- comment initialized to:
The normalizedPath cached inside a "pathPtr" object needs to be invalidated when the raw string form of the path starts with ~ and the value of ::env(HOME) changes. Here's a demo session of the problem: First, the working code in 8.3: % info patch 8.3.4 % proc test {} { set ::env(HOME) /home/dgp puts "Parent of $::env(HOME)" catch {file dirname ~} parent puts "is $parent" set ::env(HOME) /usr/local/src puts "Parent of $::env(HOME)" catch {file dirname ~} parent puts "is $parent" } % test Parent of /home/dgp is /home Parent of /usr/local/src is /usr/local Compare with the broken 8.4: % info patch 8.4a5 % proc test {} { set ::env(HOME) /home/dgp puts "Parent of $::env(HOME)" catch {file dirname ~} parent puts "is $parent" set ::env(HOME) /usr/local/src puts "Parent of $::env(HOME)" catch {file dirname ~} parent % test Parent of /home/dgp is /home Parent of /usr/local/src is /home - foundin initialized to: "obsolete: 8.4a5"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "dgp"
- subsystem initialized to: "37. File System"
- title initialized to: "clear ~ cache when ::env(HOME) changes"
- type initialized to: "Bug"
Ticket change [997afc5578] (rid 110804) by nobody on 2002-03-27 16:59:18:
- icomment:
Logged In: NO Ah! Interesting -- I didn't think of that. Fortunately there's a method in place to invalidate the cache, so it just needs calling when env(HOME) changes. Calling Tcl_FSMountsChanged(NULL); will do the trick. Unfortunately I'm travelling for the next week so can't make a patch.
- login: "nobody"
- mimetype: "text/plain"
- username: "nobody"
- icomment:
Ticket change [a2a5bbfe52] (rid 109932) by vincentdarley on 2002-04-03 15:35:59:
- status changed to: "Closed"
Ticket change [37b70d1ad8] (rid 112077) by vincentdarley on 2002-04-03 15:36:00:
- closedate changed to: "2002-04-03T08:36:00"
- closer changed to: "vincentdarley"
- icomment:
Logged In: YES user_id=32170 Applying patch to fix this problem.
- login: "vincentdarley"
- mimetype: "text/plain"
- resolution changed to: "Fixed"
- username: "vincentdarley"
Ticket change [8640625bf9] (rid 131468) by vincentdarley on 2002-04-03 15:40:58:
- closedate changed to: "2002-04-03T08:40:58"
- closer changed to: "vincentdarley"
- icomment:
Logged In: YES user_id=32170 We should also add a test to fileSystem.test to check the fixed behaviour. Vince.
- login: "vincentdarley"
- mimetype: "text/plain"
- username: "vincentdarley"
Ticket change [89d9ce3b5b] (rid 127291) by dgp on 2002-04-03 21:14:41:
- closedate changed to: "2002-04-03T14:14:41"
- closer changed to: "dgp"
- icomment:
Logged In: YES user_id=80530 Actually it was a failure in test cmdAH-8.44 that lead me to the bug. A more reliable test would be a good idea though. cmdAH-8.44 only started failing after I updated the tcltest package, and only when doing make test TESTFLAGS="-singleproc 1" According to that test, and the test case in the report, the fix is effective.
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"