Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 05460f6c37c6a3bf892314ab6d5456363c429fb0
Ticket: 530960ffffffffffffffffffffffffffffffffff
Glob munges 1st char on Win98
User & Date: vincentdarley on 2002-03-18 05:56:54
Changes

  1. icomment:
    Logged In: YES 
    user_id=32170
    
    I can't really debug this since I don't have any Win98 
    machines to test on at all.  However, the bug occurs for 
    one of three potential reasons.  First off, the way 'glob 
    *' in the new fs works is to do a 'glob -dir [pwd] *' and 
    strip off the pwd (for reasons explained in the comments in 
    the code).  What is happening therefore is that too much is 
    being stripped off.
    
    Why?  Back to the three potential reasons:
    
    (i) there's a bug in the code doing the stripping, (around 
    line 1730 in tclIOUtil.c)
    
    (ii) there's an assumption in the code (in a variety of 
    places, I believe), that '[pwd]' is a normalized path which 
    does not end in a directory delimiter, _unless_ it is the 
    name of a root volume, in which case it will end in a 
    delimiter.  On Windows, normalized paths contain forward 
    slashes, not backslashes.  So I would hope 'pwd' is 'C:/' 
    in the above case.  (and not C:\\ or C:).  So, please check 
    this out!  If 'pwd' is incorrect, then code elsewhere needs 
    fixing.
    
    (iii) since the stripping works simply be checking how 
    long 'pwd' is, and removing that, if 'glob -dir [pwd] *' is 
    returning the wrong answer, (e.g. it returns C:Windows, 
    skipping the slash), then the fault lies in 
    TclpMatchInDirectory in win/tclWinFile.c
    
    Hope that helps you to track it down.
    
    Vince.
    
    
    
    
    
    
  2. login: "vincentdarley"
  3. mimetype: "text/plain"
  4. priority changed to: "7 High"
  5. username: "vincentdarley"