summaryrefslogtreecommitdiffstats
path: root/library
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2012-07-25 14:47:03 (GMT)
committerdgp <dgp@users.sourceforge.net>2012-07-25 14:47:03 (GMT)
commita84e19af09c967bb2126faaf36661ae9f4e66a07 (patch)
treeec23263f62fd0420fbb2141401c4bd35b4d799cd /library
parentbfff3b18a0b4f5b7cfa4e431e3901a149016e1c1 (diff)
parent483da4f01b25cfc85cb3a9fb3738e624ef5759a7 (diff)
downloadtcl-a84e19af09c967bb2126faaf36661ae9f4e66a07.zip
tcl-a84e19af09c967bb2126faaf36661ae9f4e66a07.tar.gz
tcl-a84e19af09c967bb2126faaf36661ae9f4e66a07.tar.bz2
3546275 Make [auto_execok] search match [exec]. Thanks Koen Danckaert.
Diffstat (limited to 'library')
-rw-r--r--library/init.tcl15
1 files changed, 8 insertions, 7 deletions
diff --git a/library/init.tcl b/library/init.tcl
index d8de540..51c7f29 100644
--- a/library/init.tcl
+++ b/library/init.tcl
@@ -689,13 +689,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]]