Skip to content
Tcl Source Code History Of Ticket 1292143
Login

History Of Ticket 1292143

Artifacts Associated With Ticket 1292143

  1. Ticket change [98ab4d25d3] (rid 110649) by gwlester on 2005-09-15 16:50:22:

    1. assignee initialized to: "vincentdarley"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      When using windows native file separator on Windows XP
      glob returns incorrect results (see example below).
      
      (bin) 65 % set foo
      C:\Clients\LMMSS\PMES\Source\CAPP\Procs\interfaces\copics\item_master\*
      (bin) 66 % set bar
      C:/Clients/LMMSS/PMES/Source/CAPP/Procs/interfaces/copics/item_master/*
      (bin) 67 % glob $foo
      no files matched glob pattern
      "C:\Clients\LMMSS\PMES\Source\CAPP\Procs\interfaces\copics\item_master\*"
      (bin) 68 % glob $bar
      C:/Clients/LMMSS/PMES/Source/CAPP/Procs/interfaces/copics/item_master/brasfile
      C:/Clients/LMMSS/PMES/Source/CAPP/Procs/interfaces/copics/item_master/LoadItemMaster.tcl
      
    4. foundin initialized to: "obsolete: 8.4.11"
    5. priority initialized to: "5 Medium"
    6. resolution initialized to: "None"
    7. status initialized to: "Open"
    8. submitter initialized to: "gwlester"
    9. subsystem initialized to: "37. File System"
    10. title initialized to:
      glob does not accept backslash for directory separtor
      
    11. type initialized to: "Bug"
  2. Ticket change [9c521cd82d] (rid 96132) by dgp on 2005-09-16 00:04:51:

    1. icomment:
      Logged In: YES 
      user_id=80530
      
      
      Not a fix, but consider using
      [glob -directory] as a workaround.
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  3. Ticket change [ce45fd8a66] (rid 96025) by dgp on 2005-09-16 00:09:38:

    1. assignee changed to: "dgp"
    2. closedate changed to: "2005-09-15T17:09:38"
    3. closer changed to: "dgp"
    4. icomment:
      Logged In: YES 
      user_id=80530
      
      
      I think this excerpt from 
      glob.n explains it:
      
      "Since the backslash character has a special meaning to the glob
      command, glob patterns containing Windows style path
      separators need
      special care. The pattern \fIC:\e\efoo\e\e*\fR is interpreted as
      \fIC:\efoo\e*\fR where \fI\ef\fR will match the single
      character \fIf\fR
      and \fI\e*\fR will match the single character \fI*\fR and
      will not be
      interpreted as a wildcard character. One solution to this
      problem is
      to use the Unix style forward slash as a path separator.
      Windows style
      paths can be converted to Unix style paths with the command
      \fBfile
      join $path\fR (or \fBfile normalize $path\fR in Tcl 8.4)."
      
      
    5. login: "dgp"
    6. mimetype: "text/plain"
    7. resolution changed to: "Invalid"
    8. status changed to: "Pending"
    9. username: "dgp"
  4. Ticket change [535a0488fa] (rid 93745) by vincentdarley on 2005-09-16 00:16:29:

    1. closedate changed to: "2005-09-15T17:16:29"
    2. closer changed to: "vincentdarley"
    3. icomment:
      Logged In: YES 
      user_id=32170
      
      Glob does handle windows native separators just fine, but
      you need to read the glob man page where you will see that
      glob interprets:
      
      \x  (backslash-x)
      
      as an attempt to match the character x.  Hence you will need
      to double up your backslashes if you want glob to interpret
      them as directory separators.  If you read the end of the
      glob man page, you will see this:
      
      Since the backslash character has a special meaning to the glob 
      command, glob patterns containing Windows style path
      separators need 
      special care. The pattern \fIC:\e\efoo\e\e*\fR is
      interpreted as 
      \fIC:\efoo\e*\fR where \fI\ef\fR will match the single
      character \fIf\fR 
      and \fI\e*\fR will match the single character \fI*\fR and
      will not be 
      interpreted as a wildcard character. One solution to this
      problem is 
      to use the Unix style forward slash as a path separator.
      Windows style 
      paths can be converted to Unix style paths with the command
      \fBfile
      join $path\fR (or \fBfile normalize $path\fR in Tcl 8.4). 
      
      which explains exactly your problem.
      
      
      
      
    4. login: "vincentdarley"
    5. mimetype: "text/plain"
    6. status changed to: "Closed"
    7. username: "vincentdarley"