summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--library/init.tcl11
2 files changed, 15 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index eacfebe..b6971fa 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,9 @@
-2001-12-29 Don Porter <dgp@users.sourceforge.net>
+2001-12-28 Jeff Hobbs <jeffh@ActiveState.com>
+
+ * library/init.tcl: make sure env(COMSPEC) on Windows is executed
+ with the right case, as it may otherwise fail inexplicably.
+
+2001-12-28 Don Porter <dgp@users.sourceforge.net>
* generic/tclCkalloc.c (MemoryCmd, TclFinalizeMemorySubsystem):
Added the [memory onexit] command, intended to replace [checkmem].
diff --git a/library/init.tcl b/library/init.tcl
index 4802683..84d361a 100644
--- a/library/init.tcl
+++ b/library/init.tcl
@@ -3,7 +3,7 @@
# Default system startup file for Tcl-based applications. Defines
# "unknown" procedure and auto-load facilities.
#
-# RCS: @(#) $Id: init.tcl,v 1.50 2001/11/04 17:59:48 vincentdarley Exp $
+# RCS: @(#) $Id: init.tcl,v 1.51 2001/12/29 00:52:22 hobbs Exp $
#
# Copyright (c) 1991-1993 The Regents of the University of California.
# Copyright (c) 1994-1996 Sun Microsystems, Inc.
@@ -552,7 +552,14 @@ proc auto_execok name {
}
if {[lsearch -exact $shellBuiltins $name] != -1} {
- return [set auto_execs($name) [list $env(COMSPEC) /c $name]]
+ # When this is command.com for some reason on Win2K, Tcl won't
+ # 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]} {
+ set cmd [file attributes $cmd -shortname]
+ }
+ return [set auto_execs($name) [list $cmd /c $name]]
}
if {[llength [file split $name]] != 1} {