diff options
author | dgp <dgp@users.sourceforge.net> | 2012-07-25 14:44:30 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2012-07-25 14:44:30 (GMT) |
commit | 56ce2a7854579df4623d92513616dcaf21bc918c (patch) | |
tree | 7618544c31ed1573137c85f37978b6310d412094 /library/init.tcl | |
parent | 3e32c29d6bce7fef17507f521c4c392fe4f8c469 (diff) | |
parent | 19d41b2b6feb64852a1ce03ab5c535eb26922797 (diff) | |
download | tcl-56ce2a7854579df4623d92513616dcaf21bc918c.zip tcl-56ce2a7854579df4623d92513616dcaf21bc918c.tar.gz tcl-56ce2a7854579df4623d92513616dcaf21bc918c.tar.bz2 |
3546275 Make [auto_execok] search match [exec]. Thanks Koen Danckaert.
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 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]] |