summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2012-07-25 14:39:29 (GMT)
committerdgp <dgp@users.sourceforge.net>2012-07-25 14:39:29 (GMT)
commit5bd07adc46c72c884a301e9b5809239a783a2743 (patch)
tree9dc37c5dc3ba91f415975250f6238681d6ad258c
parent58515791c8e55bf546d15634a8caef7f41cf3d26 (diff)
parentb9396412d1de53f593f45c1e8255723da954c9cd (diff)
downloadtcl-5bd07adc46c72c884a301e9b5809239a783a2743.zip
tcl-5bd07adc46c72c884a301e9b5809239a783a2743.tar.gz
tcl-5bd07adc46c72c884a301e9b5809239a783a2743.tar.bz2
3546275 Make [auto_execok] search match [exec]. Thanks Koen Danckaert.
-rw-r--r--library/init.tcl13
1 files changed, 8 insertions, 5 deletions
diff --git a/library/init.tcl b/library/init.tcl
index f2f85e1..02bce3b 100644
--- a/library/init.tcl
+++ b/library/init.tcl
@@ -618,11 +618,14 @@ proc auto_execok name {
}
}
- foreach dir [split $path {;}] {
- # Skip already checked directories
- if {[info exists checked($dir)] || $dir eq {}} { continue }
- set checked($dir) {}
- foreach ext $execExtensions {
+ foreach ext $execExtensions {
+ unset -nocomplain checked
+ foreach dir [split $path {;}] {
+ # Skip already checked directories
+ if {[info exists checked($dir)] || $dir eq {}} {
+ continue
+ }
+ set checked($dir) {}
set file [file join $dir ${name}${ext}]
if {[file exists $file] && ![file isdirectory $file]} {
return [set auto_execs($name) [list $file]]