summaryrefslogtreecommitdiffstats
path: root/library/auto.tcl
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2002-07-03 19:40:30 (GMT)
committerdgp <dgp@users.sourceforge.net>2002-07-03 19:40:30 (GMT)
commitfda47bbaa13e43865058a11d857c9c08ebb02137 (patch)
tree2b21db02120d3639f36fcd6bcc811dbf3d99e42e /library/auto.tcl
parent38941ce68c0dc6530844e8d58bd9ba4f4582a92e (diff)
downloadtcl-fda47bbaa13e43865058a11d857c9c08ebb02137.zip
tcl-fda47bbaa13e43865058a11d857c9c08ebb02137.tar.gz
tcl-fda47bbaa13e43865058a11d857c9c08ebb02137.tar.bz2
* tests/main.test: Cheap fix for [Bugs 575851, 575858]. Avoid
* tests/tcltest.test: non-writable . by [cd [temporaryDirectory]]. * library/auto.tcl: Fix [tcl_findLibrary] to be sure it sets $varName only if a successful library script is found. [Bug 577033]
Diffstat (limited to 'library/auto.tcl')
-rw-r--r--library/auto.tcl8
1 files changed, 6 insertions, 2 deletions
diff --git a/library/auto.tcl b/library/auto.tcl
index 2ad40eb..296764f 100644
--- a/library/auto.tcl
+++ b/library/auto.tcl
@@ -3,7 +3,7 @@
# utility procs formerly in init.tcl dealing with auto execution
# of commands and can be auto loaded themselves.
#
-# RCS: @(#) $Id: auto.tcl,v 1.8 2001/08/27 02:14:08 dgp Exp $
+# RCS: @(#) $Id: auto.tcl,v 1.9 2002/07/03 19:40:31 dgp Exp $
#
# Copyright (c) 1991-1993 The Regents of the University of California.
# Copyright (c) 1994-1998 Sun Microsystems, Inc.
@@ -60,7 +60,8 @@ proc tcl_findLibrary {basename version patch initScript enVarName varName} {
# The C application may have hardwired a path, which we honor
- if {[info exists the_library] && [string compare $the_library {}]} {
+ set variableSet [info exists the_library]
+ if {$variableSet && [string compare $the_library {}]} {
lappend dirs $the_library
} else {
@@ -112,6 +113,9 @@ proc tcl_findLibrary {basename version patch initScript enVarName varName} {
}
}
}
+ if {!$variableSet} {
+ unset the_library
+ }
set msg "Can't find a usable $initScript in the following directories: \n"
append msg " $dirs\n\n"
append msg "$errors\n\n"