File: u695c66c_Fix-glob-with-patterns-containing-spaces.patch

package info (click to toggle)
jimtcl 0.73-3
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 9,760 kB
  • sloc: ansic: 120,467; sh: 4,106; tcl: 3,903; cpp: 1,671; makefile: 227
file content (26 lines) | stat: -rw-r--r-- 820 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
commit 695c66cf85db881c430ccb0c54d41678ef770c33
Author: Steve Bennett <steveb@workware.net.au>
Date:   Sun Jan 29 08:37:08 2012 +1000

    Fix glob with patterns containing spaces
    
    Signed-off-by: Steve Bennett <steveb@workware.net.au>
    Reported-by: af123 <jimdevel@hummypkg.org.uk>

diff --git a/glob.tcl b/glob.tcl
index cd94d8d..3e8a3fd 100644
--- a/glob.tcl
+++ b/glob.tcl
@@ -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]