diff options
author | Steve Bennett <steveb@workware.net.au> | 2012-01-31 11:11:13 +1000 |
---|---|---|
committer | Steve Bennett <steveb@workware.net.au> | 2012-02-02 08:19:06 +1000 |
commit | 4adf7e3abd33471672488e121dc1c4f32dc65b00 (patch) | |
tree | fae9a5d36e58258dc43d462e2f438f22c3649e37 /glob.tcl | |
parent | c81033685d5a28a6caf5ba22fb29109e3e03f8d1 (diff) | |
download | jimtcl-4adf7e3abd33471672488e121dc1c4f32dc65b00.zip jimtcl-4adf7e3abd33471672488e121dc1c4f32dc65b00.tar.gz jimtcl-4adf7e3abd33471672488e121dc1c4f32dc65b00.tar.bz2 |
glob patterns can contain [] too
Signed-off-by: Steve Bennett <steveb@workware.net.au>
Reported-by: af123 <jimdevel@hummypkg.org.uk>
Diffstat (limited to 'glob.tcl')
-rw-r--r-- | glob.tcl | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -31,7 +31,7 @@ proc glob {args} { } # If the pattern isn't actually a pattern... - if {[string match {*[*?]*} $pattern]} { + if {[string match {*[[*?]*} $pattern]} { # Use -nocomplain here to return nothing if $dir is not a directory set files [readdir -nocomplain $dir] } elseif {[file isdir $dir] && [file exists $dir/$pattern]} { |