summaryrefslogtreecommitdiffstats
path: root/library
diff options
context:
space:
mode:
authordgp <dgp@noemail.net>2002-07-03 19:40:30 (GMT)
committerdgp <dgp@noemail.net>2002-07-03 19:40:30 (GMT)
commitffca7ab8a9cf1ad55bd4b58f74acf6dd7c1a43cf (patch)
tree2b21db02120d3639f36fcd6bcc811dbf3d99e42e /library
parent415ef06ddf3f3b2342944e75c8795af1f91daa00 (diff)
downloadtcl-ffca7ab8a9cf1ad55bd4b58f74acf6dd7c1a43cf.zip
tcl-ffca7ab8a9cf1ad55bd4b58f74acf6dd7c1a43cf.tar.gz
tcl-ffca7ab8a9cf1ad55bd4b58f74acf6dd7c1a43cf.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] FossilOrigin-Name: 332c6597041b4e9888f1fd3b64b1f8e053c39561
Diffstat (limited to 'library')
-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"