Artifacts Associated With Ticket 1292143fffffffffffffffffffffffffffffffff
Ticket change [98ab4d25d3] (rid 110649) by gwlester on 2005-09-15 16:50:22:
- assignee initialized to: "vincentdarley"
- cmimetype initialized to: "text/plain"
- 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
- foundin initialized to: "obsolete: 8.4.11"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "gwlester"
- subsystem initialized to: "37. File System"
- title initialized to:
glob does not accept backslash for directory separtor
- type initialized to: "Bug"
Ticket change [9c521cd82d] (rid 96132) by dgp on 2005-09-16 00:04:51:
- icomment:
Logged In: YES user_id=80530 Not a fix, but consider using [glob -directory] as a workaround.
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [ce45fd8a66] (rid 96025) by dgp on 2005-09-16 00:09:38:
- assignee changed to: "dgp"
- closedate changed to: "2005-09-15T17:09:38"
- closer changed to: "dgp"
- 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)."
- login: "dgp"
- mimetype: "text/plain"
- resolution changed to: "Invalid"
- status changed to: "Pending"
- username: "dgp"
Ticket change [535a0488fa] (rid 93745) by vincentdarley on 2005-09-16 00:16:29:
- closedate changed to: "2005-09-15T17:16:29"
- closer changed to: "vincentdarley"
- 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.
- login: "vincentdarley"
- mimetype: "text/plain"
- status changed to: "Closed"
- username: "vincentdarley"