diff options
| author | dgp@users.sourceforge.net <dgp> | 2012-07-25 14:44:30 (GMT) |
|---|---|---|
| committer | dgp@users.sourceforge.net <dgp> | 2012-07-25 14:44:30 (GMT) |
| commit | e6c9c292f6cffed528b57b02e234d51189c459c6 (patch) | |
| tree | 7618544c31ed1573137c85f37978b6310d412094 /library/init.tcl | |
| parent | fd8a71286053b46a132c1e0a6c6ac324f7bb7802 (diff) | |
| parent | 33ed716ec07b6608b52df0ab60e8a58ddb7b5395 (diff) | |
| download | tcl-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.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]] |
