diff options
-rw-r--r-- | library/init.tcl | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/library/init.tcl b/library/init.tcl index 544ea77..f522a7c 100644 --- a/library/init.tcl +++ b/library/init.tcl @@ -650,7 +650,7 @@ proc auto_execok name { # exec it unless the case is right, which this corrects. COMSPEC # may not point to a real file, so do the check. set cmd $env(COMSPEC) - if {[file exists $cmd]} { + if {[file executable $cmd]} { set cmd [file attributes $cmd -shortname] } return [set auto_execs($name) [list $cmd /c $name]] @@ -659,7 +659,7 @@ proc auto_execok name { if {[llength [file split $name]] != 1} { foreach ext $execExtensions { set file ${name}${ext} - if {[file exists $file] && ![file isdirectory $file]} { + if {[file executable $file] && ![file isdirectory $file]} { return [set auto_execs($name) [list $file]] } } @@ -692,7 +692,7 @@ proc auto_execok name { } set checked($dir) {} set file [file join $dir ${name}${ext}] - if {[file exists $file] && ![file isdirectory $file]} { + if {[file executable $file] && ![file isdirectory $file]} { return [set auto_execs($name) [list $file]] } } |