summaryrefslogtreecommitdiffstats
path: root/library/init.tcl
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2012-07-25 15:03:02 (GMT)
committerdgp <dgp@users.sourceforge.net>2012-07-25 15:03:02 (GMT)
commit81f96df6176c44d1f7159a0fbcb8bd4c68c0c94d (patch)
tree102f45919dfd6db170dbccb414845132439e1590 /library/init.tcl
parent4eef2a8f1f3ceb740cfca5f5b7e991fece4740e7 (diff)
parent3b6f6e4d4166d6ba00d2886efd6136f30e906f82 (diff)
downloadtcl-81f96df6176c44d1f7159a0fbcb8bd4c68c0c94d.zip
tcl-81f96df6176c44d1f7159a0fbcb8bd4c68c0c94d.tar.gz
tcl-81f96df6176c44d1f7159a0fbcb8bd4c68c0c94d.tar.bz2
Diffstat (limited to 'library/init.tcl')
-rw-r--r--library/init.tcl13
1 files changed, 8 insertions, 5 deletions
diff --git a/library/init.tcl b/library/init.tcl
index f6dfdba..16957b3 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]]