aboutsummaryrefslogtreecommitdiff
path: root/glob.tcl
diff options
context:
space:
mode:
authorSteve Bennett <steveb@workware.net.au>2012-01-31 11:11:13 +1000
committerSteve Bennett <steveb@workware.net.au>2012-02-02 08:19:06 +1000
commit4adf7e3abd33471672488e121dc1c4f32dc65b00 (patch)
treefae9a5d36e58258dc43d462e2f438f22c3649e37 /glob.tcl
parentc81033685d5a28a6caf5ba22fb29109e3e03f8d1 (diff)
downloadjimtcl-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.tcl2
1 files changed, 1 insertions, 1 deletions
diff --git a/glob.tcl b/glob.tcl
index 3e8a3fd..d0e57d6 100644
--- a/glob.tcl
+++ b/glob.tcl
@@ -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]} {