Commit Diff


commit - 39720f282faa2a1840de660fe7a9568dbf6b13a9
commit + 340514ae173c1261ba77df08b5cba810b500a7d0
blob - ab3fdf9a8cb139197be9b873ea23fda844e5d281
blob + b9ee736e17b8134c69d8125fa4efe3996c7c620d
--- exercise
+++ exercise
@@ -143,11 +143,14 @@ proc find_files_iter {resultvar dirsvar paths} {
             set normpath [file normalize $path]
             if {[dict exists $dirs $normpath]} continue
             dict set dirs $normpath {}
-                
-            set subs   [glob -type d -nocomplain -directory $path -- $opts(-pd)]
-            set suites [glob -type f -nocomplain -directory $path -- $opts(-ps)]
-            set tests  [glob -type f -nocomplain -directory $path -- $opts(-pt)]
 
+            set diropt "-directory $path"
+            if {$path eq "."} {set diropt ""}
+
+            set subs   [glob -type d -nocomplain {*}$diropt -- $opts(-pd)]
+            set suites [glob -type f -nocomplain {*}$diropt -- $opts(-ps)]
+            set tests  [glob -type f -nocomplain {*}$diropt -- $opts(-pt)]
+
             find_files_iter result dirs [lsort $subs]
             lappend result {*}[lsort $suites]
             lappend result {*}[lsort $tests]