Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: b9a5cc2259d783aac33919859070deb3c010e207
Ticket: 800106ffffffffffffffffffffffffffffffffff
Incorrect treatment of mounted file by glob.
User & Date: vincentdarley on 2003-09-04 16:54:26
Changes

  1. icomment:
    Logged In: YES 
    user_id=32170
    
    Another complication -- what if we mount something not over
    itself, but simply into a previously non-existent file, then
    'glob' won't even list it at all.
    
    Given this problem, the best (only?) solution I can think of
    is that the *generic* function Tcl_FSMatchInDirectory in
    tclIOUtil.c should check whether any vfs's are registered
    *inside* the directory being listed, and if this is true,
    modify the result appropriately. This would also have an
    advantage of the performance impact being small, provided we
    can do that test relatively easily.  It also has the benefit
    of being a reasonably elegant solution.
    
    Unfortunately, there is no current API by which a filesystem
    can be asked "Do you have any mounts in directory 'foo'?",
    although it is in some sense a generalisation of the
    Tcl_FSListVolumes function. This means to solve the problem,
    we will need to do something like increment
    TCL_FILESYSTEM_VERSION_1, and overload Tcl_FSListVolumes as
    a new function (Tcl_FSListMounts) which takes as a parameter
    a Tcl_Obj containing a directory. If that directory is null,
    the function behaves like the old Tcl_FSListVolumes, and
    otherwise it asks the filesystem for a list of all matching
    mounts in the given directory.
    
    So, this fix is only really possible in Tcl 8.5 and will
    require a TIP. While we're at it, therefore, we might wish
    to consider other filesystem enhancements.
    
    At this point I should say I have other priorities which
    mean I do not expect to see myself as the primary author of
    any such tip...
    
    Vince.
    
    
    
    
    
    
    
  2. login: "vincentdarley"
  3. mimetype: "text/plain"
  4. username: "vincentdarley"