summaryrefslogtreecommitdiffstats
path: root/library/init.tcl
diff options
context:
space:
mode:
authordgp@users.sourceforge.net <dgp>2012-07-25 14:44:30 (GMT)
committerdgp@users.sourceforge.net <dgp>2012-07-25 14:44:30 (GMT)
commite6c9c292f6cffed528b57b02e234d51189c459c6 (patch)
tree7618544c31ed1573137c85f37978b6310d412094 /library/init.tcl
parentfd8a71286053b46a132c1e0a6c6ac324f7bb7802 (diff)
parent33ed716ec07b6608b52df0ab60e8a58ddb7b5395 (diff)
downloadtcl-e6c9c292f6cffed528b57b02e234d51189c459c6.zip
tcl-e6c9c292f6cffed528b57b02e234d51189c459c6.tar.gz
tcl-e6c9c292f6cffed528b57b02e234d51189c459c6.tar.bz2
3546275 Make [auto_execok] search match [exec]. Thanks Koen Danckaert.
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 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]]