Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 0502b0b3a12ae5641fe23b3260fb6b544e5e67cf
Ticket: 2886914fffffffffffffffffffffffffffffffff
unexpected absolute path with vfs
User & Date: blacksqr on 2009-10-27 06:02:17
Changes

  1. assignee changed to: "vincentdarley"
  2. cmimetype changed to: "text/plain"
  3. comment changed 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 changed to: "obsolete: 8.5.5"
  5. is_private changed to: "0"
  6. priority changed to: "5 Medium"
  7. resolution changed to: "None"
  8. status changed to: "Open"
  9. submitter changed to: "blacksqr"
  10. subsystem changed to: "37. File System"
  11. title changed to: ""file join" improperly injects space"
  12. type changed to: "Bug"