Skip to content
Tcl Source Code History Of Ticket 2886914
Login

History Of Ticket 2886914

Artifacts Associated With Ticket 2886914

  1. Ticket change [0502b0b3a1] (rid 88975) by blacksqr on 2009-10-27 06:02:17:

    1. assignee initialized to: "vincentdarley"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      When using "file join" on a string that happens to include a virtual volume name as a substring, the string is improperly split at the substring boundary, and the command acts as though there were a space at the substring boundary.
      
      For convenience I have attached a file (templatevfs.tcl) to make it easy to create a virtual volume by mounting a virtual filesystem, but the issue should not be construed as limited to this vfs.
      
      Example:
      
      % cd
      % file mkdir testvfs
      % source templatevfs.tcl
      % vfs::template::mount -volume testvfs testvfs
      testvfs
      %file volumes ; # note testvfs is now a virtual volume
      testvfs /
      % file join testvfstest ; # expect response: testvfstest
      testvfs/test
      
      Note in the last statement "testvfstest" is an arbitrary string which just happens to start with "testvfs".  The command "file join testvfstest" should simply echo the argument string.  But the command acts as if there were a space between "testvfs" and "test".
      
      Also note:
      
      % file join foo testvfstest
      testvfs/test
      
      Discarding "foo" would be expected if there were a space between "testvfs" and "test", since the command discards arguments that come before a volume name.  But the response should be "foo/testvfstest".  This illustrates that "testvfs" is being treated as a volume name rather than as a substring. 
      
      Tested on Ubuntu Hardy.
      
    4. foundin initialized to: "obsolete: 8.5.5"
    5. is_private initialized to: "0"
    6. priority initialized to: "5 Medium"
    7. resolution initialized to: "None"
    8. status initialized to: "Open"
    9. submitter initialized to: "blacksqr"
    10. subsystem initialized to: "37. File System"
    11. title initialized to: ""file join" improperly injects space"
    12. type initialized to: "Bug"
  2. Add attachment "templatevfs.tcl" [7f7cc6b24b] (rid 97569) by blacksqr on 2009-10-27 13:02:20.

  3. Ticket change [58579eb13f] (rid 117784) by blacksqr on 2009-10-27 13:02:20:

    1. icomment:
      
      
      File Added - 348324: templatevfs.tcl
      
      
      
    2. login: "blacksqr"
    3. mimetype: "text/plain"
    4. username: "blacksqr"
  4. Ticket change [8d73714cca] (rid 127935) by dgp on 2009-10-27 21:53:18:

    1. icomment:
      
      At the point of failure, what does
      [file pathtype testvfstest] return?
      
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  5. Ticket change [0d4544ae10] (rid 114331) by dgp on 2009-10-27 21:53:19:

    1. assignee changed to: "dgp"
    2. closedate changed to: "2009-10-27T14:53:19"
    3. closer changed to: "dgp"
    4. priority changed to: "7 High"
    5. status changed to: "Pending"
  6. Ticket change [119b98df60] (rid 95177) by dgp on 2009-10-28 00:23:03:

    1. icomment:
      
      The values returned by [file system testvfstest]
      and [file normalize testvfstest] might be useful
      as well.
      
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  7. Ticket change [028dcf4131] (rid 119670) by blacksqr on 2009-10-28 12:47:49:

    1. icomment:
      After executing the steps above:
      
      % file join testvfstest
      testvfs/test
      % file pathtype testvfstest
      absolute
      % file system testvfstest
      native
      % file normalize testvfstest
      <home>/testvfs/test
      
      
    2. login: "blacksqr"
    3. mimetype: "text/plain"
    4. username: "blacksqr"
  8. Ticket change [c0ab806402] (rid 102449) by blacksqr on 2009-10-28 12:47:51:

    1. status changed to: "Open"
  9. Ticket change [dbd9fb4da4] (rid 108030) by dgp on 2009-10-28 22:38:37:

    1. icomment:
      
      Thanks for the replies.
      
      Since "testvfstest" is seen as
      an absolute path, [file join] is behaving
      properly as documented.
      
      The bug, if there is one, is the combination
      of results you just posted.  Whether the
      flaw is in Tcl, tclvfs, the vfs::template driver,
      or your code, I cannot say without diving
      deeper.  Can you, or someone in any
      of those projects say with more clarity,
      which of the command outcomes you
      posted are incorrect, and why?
      
      Thanks.
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  10. Ticket change [dc810da57c] (rid 114492) by dgp on 2009-10-28 22:38:38:

    1. closedate changed to: "2009-10-28T15:38:38"
    2. closer changed to: "dgp"
    3. status changed to: "Pending"
  11. Ticket change [f60ec7a23a] (rid 130226) by dgp on 2009-10-28 22:39:12:

    1. title changed to: "unexpected absolute path with vfs"
  12. Ticket change [3301871a9a] (rid 93715) by blacksqr on 2009-10-31 12:49:32:

    1. icomment:
      It is incorrect for [file pathtype] to return a value of "absolute" in the given example.  Since there is no path separator in the string "testvfstest", the only time [file pathtype testvfstest] should return "absolute" would be if there were a mounted volume named "testvfstest", but there isn't.  
      
      It is also incorrect for [file join testvfstest] to return "testvfs/test", even if it were correct that testvfstest was an absolute path.  If [file join] is passed an absolute path as the sole argument, the argument should be returned unchanged.  If [file join] is passed an arbitrary string that doesn't correspond to an existing file, the string should also be returned unchanged.  Whichever is the case, [file join] should simply pass the argument back unchanged.
      
      There is no file or volume named "testvfstest".  The handler code written by me is not called when either the [file pathtype] command or the [file join] command is executed.  Thus the problem is either with Tcl or the Tclvfs extension.
      
      
    2. login: "blacksqr"
    3. mimetype: "text/plain"
    4. username: "blacksqr"
  13. Ticket change [6f271ca8a7] (rid 100262) by blacksqr on 2009-10-31 12:49:35:

    1. status changed to: "Open"
  14. Ticket change [f286baf5f7] (rid 109557) by dgp on 2009-11-04 00:38:10:

    1. icomment:
      
      Reproduced on all the branches 8-4, 8-5, and HEAD,
      as well as in the 8.4.0 release.
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  15. Ticket change [0943ec7e79] (rid 89692) by dgp on 2009-11-04 01:25:25:

    1. icomment:
      
      This looks like part operator error, and part a bug
      in either tclvfs or the driver.
      
      The mount command created a new
      volume "testvfs" which means *every*
      path that begins with that substring is
      now an absolute pathname in the filesystem
      controlling that volume.  This is why
      [file pathype testvfstest] is reporting "absolute".
      
      If what you really wanted was to only have
      pathnames beginning with "testvfs/" to be
      in the volume, then I think the command
      should  have been:
      
      vfs::template::mount -volume testvfs testvfs/
      
      See if you are happier with the results of that
      change.  At a minimum that is a workaround.
      
      A bug which seems to be contributing to
      problems is that if all paths beginning with the
      prefix substring "testvfs" are now to belong to
      that volume, then they should be claimed by
      the filesystem that has control over that volume,
      which means
      
      [file system testvfstest] => native
      
      is an incorrect result.  This seems likely
      to me to be a failure of the filesystem driver
      to claim a path that belongs to it.  Precisely
      where that bug is, I do not yet know.
      
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  16. Ticket change [e7eddd945a] (rid 104557) by dgp on 2009-11-04 01:26:49:

    1. icomment:
      
      If you have a different understanding about
      how these things are supposed to properly
      work, please point me to the docs that support
      your view.
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  17. Ticket change [0fb0363c63] (rid 94835) by dgp on 2009-11-04 01:26:51:

    1. closedate changed to: "2009-11-03T18:26:51"
    2. closer changed to: "dgp"
    3. status changed to: "Pending"
  18. Ticket change [995e1aa306] (rid 110781) by sf-robot on 2009-11-18 09:20:21:

    1. closedate changed to: "2009-11-18T02:20:21"
    2. closer changed to: "sf-robot"
    3. icomment:
      
      
      allow_comments - 1
      
      This Tracker item was closed automatically by the system. It was
      previously set to a Pending status, and the original submitter
      did not respond within 14 days (the time period specified by
      the administrator of this Tracker).
      
      
    4. login: "sf-robot"
    5. mimetype: "text/plain"
    6. status changed to: "Closed"
    7. username: "sf-robot"