Overview
Artifact ID: | 47fe708cf26ba7b87c6b93659a79898e2f945d5c |
---|---|
Ticket: | da7c079978cb3183731147d2e6a555794416a5bf
FS strips root '/' from FS root volume "zvfs:/" |
User & Date: | anonymous 2017-06-18 00:15:59 |
Changes
- icomment:
I am continuing with my zvfs: fs and I found another bug. Again, it is an instance of Tcl not handling VOLUME_RELATIVE fs correctly and doing a "windows" thing just because I happen to be developing on windows. After: % cd zvfs: % pwd zvfs:/ % cd / "cd /" attempts to cd to "zv/" Tcl_FSGetNormalizedPath() in tclPathObj.c around line 1946: Tcl_PathType type = Tcl_FSGetPathType(absolutePath); Variable "type" is now set to TCL_PATH_VOLUME_RELATIVE (which is actually correct even though my fs is not windows) A few lines later: #ifdef _WIN32 } else if (type == TCL_PATH_VOLUME_RELATIVE) { /* * Only Windows has volume-relative paths. */ If TCL_PATH_VOLUME_RELATIVE is only for windows, then Tcl_FSGetPathType() has a bug. Otherwise, the comment "Only Windows has volume..." is false. Since TclWinVolumeRelativeNormalize() is called, it makes the incorrect assumption that the cwd is of the form "D:..." (<drive>:) and proceeds to take the "D:" and append the "/". Thus the bogus result "zv/". That path is passed to FSPathInFilesystemProc where it is rejected.
- login: "anonymous"
- mimetype: "text/plain"