[Tcl-bugs] [Tcl] (anonymous) tkt (Open): FS strips root ' /' from FS root volume "zvfs:/"

Previous Topic Next Topic
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
Report Content as Inappropriate

[Tcl-bugs] [Tcl] (anonymous) tkt (Open): FS strips root ' /' from FS root volume "zvfs:/"

Automated mail by fx, on behalf of [hidden email]

Ticket Change [47fe708cf26ba7b87c6b93659a79898e2f945d5c]
  [FS strips root '/' from FS root volume "zvfs:/"]
  By      anonymous
  For     Tcl
  On      2017-06-18T00:15:59.003
  Details https://core.tcl.tk/tcl/tinfo?name=47fe708cf26ba7b87c6b93659a79898e2f945d5c
  Ticket  https://core.tcl.tk/tcl/tktview/da7c079978cb3183731147d2e6a555794416a5bf

Changed Fields
  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

            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

See Tcl/Tk development @ http://core.tcl.tk/

Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Tcl-Bugs mailing list
[hidden email]