diff options
author | dgp <dgp@users.sourceforge.net> | 2012-07-25 15:03:02 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2012-07-25 15:03:02 (GMT) |
commit | 643148e686b700852b7d0196180f28e185a13a5a (patch) | |
tree | 102f45919dfd6db170dbccb414845132439e1590 /library/init.tcl | |
parent | 22613b0163fb3cbdaff6dabb029940fc526ca918 (diff) | |
parent | f2ef7ef78982c2be84ab1ad8a4a3d99592133946 (diff) | |
download | tcl-643148e686b700852b7d0196180f28e185a13a5a.zip tcl-643148e686b700852b7d0196180f28e185a13a5a.tar.gz tcl-643148e686b700852b7d0196180f28e185a13a5a.tar.bz2 |
merge 8.5
Diffstat (limited to 'library/init.tcl')
-rw-r--r-- | library/init.tcl | 13 |
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]] |