summaryrefslogtreecommitdiffstats
path: root/library
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2012-07-25 14:44:30 (GMT)
committerdgp <dgp@users.sourceforge.net>2012-07-25 14:44:30 (GMT)
commit483da4f01b25cfc85cb3a9fb3738e624ef5759a7 (patch)
tree7618544c31ed1573137c85f37978b6310d412094 /library
parentedb3677e32a8f8ba0c8fb6eb32e2b75a1dd353df (diff)
parent5bd07adc46c72c884a301e9b5809239a783a2743 (diff)
downloadtcl-483da4f01b25cfc85cb3a9fb3738e624ef5759a7.zip
tcl-483da4f01b25cfc85cb3a9fb3738e624ef5759a7.tar.gz
tcl-483da4f01b25cfc85cb3a9fb3738e624ef5759a7.tar.bz2
3546275 Make [auto_execok] search match [exec]. Thanks Koen Danckaert.
Diffstat (limited to 'library')
-rw-r--r--library/init.tcl13
1 files changed, 8 insertions, 5 deletions
diff --git a/library/init.tcl b/library/init.tcl
index 28689ab..4a345ec 100644
--- a/library/init.tcl
+++ b/library/init.tcl
@@ -698,11 +698,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]]