diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2021-07-14 16:06:32 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2021-07-14 16:06:32 (GMT) |
commit | 68dc740f26b2dcfa851eccb83abe9dbddd557518 (patch) | |
tree | 36bdd9a1ee593d32a46ec305a85707baa25fd2f1 /library | |
parent | 259220cf732837ce3e7295f84a3d87e8eba655da (diff) | |
download | tcl-68dc740f26b2dcfa851eccb83abe9dbddd557518.zip tcl-68dc740f26b2dcfa851eccb83abe9dbddd557518.tar.gz tcl-68dc740f26b2dcfa851eccb83abe9dbddd557518.tar.bz2 |
Fix [1a89eba3761f62ee]: Add "exit" Windows shell built-in to auto_execok
Diffstat (limited to 'library')
-rw-r--r-- | library/init.tcl | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/library/init.tcl b/library/init.tcl index 6e4cf89..4aad20c 100644 --- a/library/init.tcl +++ b/library/init.tcl @@ -501,7 +501,7 @@ proc auto_load_index {} { continue } else { set error [catch { - fconfigure $f -eofchar \032 + fconfigure $f -eofchar "\032 {}" set id [gets $f] if {$id eq "# Tcl autoload index file, version 2.0"} { eval [read $f] @@ -637,7 +637,7 @@ proc auto_import {pattern} { if {$tcl_platform(platform) eq "windows"} { # Windows version. # -# Note that info executable doesn't work under Windows, so we have to +# Note that file executable doesn't work under Windows, so we have to # look for files with .exe, .com, or .bat extensions. Also, the path # may be in the Path or PATH environment variables, and path # components are separated with semicolons, not colons as under Unix. @@ -650,8 +650,8 @@ proc auto_execok name { } set auto_execs($name) "" - set shellBuiltins [list cls copy date del dir echo erase md mkdir \ - mklink rd ren rename rmdir start time type ver vol] + set shellBuiltins [list assoc cls copy date del dir echo erase exit ftype \ + md mkdir mklink move rd ren rename rmdir start time type ver vol] if {[info exists env(PATHEXT)]} { # Add an initial ; to have the {} extension check first. set execExtensions [split ";$env(PATHEXT)" ";"] @@ -805,7 +805,7 @@ proc tcl::CopyDirectory {action src dest} { } } } else { - if {[string first $nsrc $ndest] != -1} { + if {[string first $nsrc $ndest] >= 0} { set srclen [expr {[llength [file split $nsrc]] - 1}] set ndest [lindex [file split $ndest] $srclen] if {$ndest eq [file tail $nsrc]} { |