|
2026-09-18
| ||
| 16:27 | • Closed ticket [bca391ab51]: cd and file normalize inconsistency with volume-rela... artifact: c75e86aa11 user: sebres | |
| 16:26 | ultimatelly closes [bca391ab51cd48e7]: fixed regression introduced in [38f0ce657c] (don't use 2nd dr... check-in: 56afc6b1bc user: sebres tags: trunk, main | |
| 16:10 | • Open ticket [bca391ab51]: cd and file normalize inconsistency with volume-relati... artifact: 0b4cbf5d5c user: sebres | |
|
2026-03-25
| ||
| 06:19 | • Closed ticket [bca391ab51]. artifact: 085845f69e user: apnadkarni | |
| 06:14 | Fix [bca391ab51]. Track current directory for each drive on Windows check-in: 38f0ce657c user: apnadkarni tags: trunk, main | |
|
2026-03-20
| ||
| 16:53 | • Ticket [bca391ab51] cd and file normalize inconsistency with volume-relative pat... artifact: 5e1d1e223a user: apnadkarni | |
| 16:49 | • Ticket [bca391ab51]: 3 changes artifact: e6249cc0db user: apnadkarni | |
|
2026-03-19
| ||
| 12:06 | Bug [bca391ab51] - normalization of volume-relative files - WIP. check-in: b71c3b2471 user: apnadkarni tags: bug-b71c3b2471 | |
|
2026-03-18
| ||
| 16:18 | • New ticket [bca391ab51] cd and file normalize inconsistency with volume-relative... artifact: 11abf667c9 user: apnadkarni | |
cd and file normalize inconsistency with volume-relative paths on Windows
The following shows inconsistencies in behaviour in the use of volume-relative paths. At the DOS command level, current directory for drives C: and D: are tcl and src respectively.
c:\Tcl>d:
D:\src>tclsh
% cd d:
% pwd
D:/src
% cd c:
% pwd
C:/
Along similar lines,
D:\src>tclsh
% file normalize d:
D:/src
% file normalize c:
C:/
does not seem consistent given that the current directory on C: at the OS level was not root.
I think volume relative paths should be resolved relative to the current directory on that volume as seen at the process / OS level.
38f0ce657cFix [bca391ab51]. Track current directory for each drive on Windows check-in2026-03-25 06:14:18b71c3b2471Bug [bca391ab51] - normalization of volume-relative files - WIP. check-in2026-03-19 12:06:49
A more obvious inconsistency with Windows user expectations:
Command shell:
D:\src>pwd
D:\src
D:\src>cd C:
C:\
D:\src>cd d:
D:\src
D:\src>pwd
D:\src
vs Tcl:
D:\src>tclsh
% pwd
D:/src
% cd c:
% cd d:
% pwd
D:/
Proposed solution in bug-b71c3b2471. This tracks current directory per drive via env variables as in CMD.EXE so exec's will also inherit the mappings.
An alternative would be to always treat X: as X:/ (the root dir). This would also be consistent (and of course trivial to implement) but would not reflect user expectations that are based on the Windows command line.
Fixed in [38f0ce657c] as no objections raised on core. Not backported to 9.0 as I don't think such a change should go into a patch release.
I don't think the fix is fully correct, or rather doesn't introduce an error in case if current directory (where test-suite started) not in the first drive.
Still worse it would be if current directory is neither in first nor in second drive.
Moreover it seems to overwrite path unconditionally (in line 339), what causes the set path in else case doesn't matter at all.
But even without that overwrite this test will fail if current directory is T:/Temp (like my TEMP folder on RAM drive T:), so the comparison [file norm $path] with [file join $dir foo] happens on "D:/foo" (normalized "D:foo") and "T:/Temp/foo" (what obviously never equal).
Fixed in [56afc6b1bcc19c16] now.