aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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]} {