Permalink
Browse files

glob patterns can contain [] too

Signed-off-by: Steve Bennett <steveb@workware.net.au>
Reported-by: af123 <jimdevel@hummypkg.org.uk>
  • Loading branch information...
msteveb committed Jan 31, 2012
1 parent c810336 commit 4adf7e3abd33471672488e121dc1c4f32dc65b00
Showing with 1 addition and 1 deletion.
  1. +1 −1 glob.tcl
View
@@ -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]} {

0 comments on commit 4adf7e3

Please sign in to comment.