diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2012-08-02 12:08:37 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2012-08-02 12:08:37 (GMT) |
commit | 33bcb6e718ec30da522f10e0388743eafab975c7 (patch) | |
tree | 77b059089eb70cf671ae3bf5930fda9cf184e04b /library | |
parent | b368bda168f6c601da96e6caa9b6d7bc8ba98fc5 (diff) | |
parent | 3546e128c0c379f71d6fdf6678ad19cd9d0a0265 (diff) | |
download | tcl-33bcb6e718ec30da522f10e0388743eafab975c7.zip tcl-33bcb6e718ec30da522f10e0388743eafab975c7.tar.gz tcl-33bcb6e718ec30da522f10e0388743eafab975c7.tar.bz2 |
merge trunk
Diffstat (limited to 'library')
-rw-r--r-- | library/init.tcl | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/library/init.tcl b/library/init.tcl index d8de540..51c7f29 100644 --- a/library/init.tcl +++ b/library/init.tcl @@ -689,13 +689,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]] |