Skip to content

Commit

Permalink
Fix glob with patterns containing spaces
Browse files Browse the repository at this point in the history
Signed-off-by: Steve Bennett <steveb@workware.net.au>
Reported-by: af123 <jimdevel@hummypkg.org.uk>
  • Loading branch information
msteveb committed Jan 28, 2012
1 parent b5fcd96 commit 695c66c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions glob.tcl
Expand Up @@ -61,10 +61,10 @@ proc glob {args} {
# Avoid regexp for dependency reasons.
# XXX: Doesn't handle backslashed braces
if {[set fb [string first "\{" $pattern]] < 0} {
return $pattern
return [list $pattern]
}
if {[set nb [string first "\}" $pattern $fb]] < 0} {
return $pattern
return [list $pattern]
}
set before [string range $pattern 0 $fb-1]
set braced [string range $pattern $fb+1 $nb-1]
Expand Down

0 comments on commit 695c66c

Please sign in to comment.