summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsebres <sebres@users.sourceforge.net>2024-11-13 19:31:01 (GMT)
committersebres <sebres@users.sourceforge.net>2024-11-13 19:31:01 (GMT)
commit53e0d3737652fa8bb15e592b3d23d97635a7e4b5 (patch)
tree5189394e66e8028724fa789701ad4a36282c0c7a
parent2c933faa342b59e9b4c40e169c160ee9dbc348dc (diff)
downloadtcl-53e0d3737652fa8bb15e592b3d23d97635a7e4b5.zip
tcl-53e0d3737652fa8bb15e592b3d23d97635a7e4b5.tar.gz
tcl-53e0d3737652fa8bb15e592b3d23d97635a7e4b5.tar.bz2
small amend: don't add empty dir to dirs var (error message)
-rw-r--r--generic/tclInterp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/generic/tclInterp.c b/generic/tclInterp.c
index aa7a0b3..8cf7162 100644
--- a/generic/tclInterp.c
+++ b/generic/tclInterp.c
@@ -414,8 +414,7 @@ Tcl_Init(
" set dirs {}\n"
" set errors {}\n"
" foreach script $scripts {\n"
-" lappend dirs [set tcl_library [eval $script]]\n"
-" if {$tcl_library eq \"\"} continue\n"
+" if {[set tcl_library [eval $script]] eq \"\"} continue\n"
" set tclfile [file join $tcl_library init.tcl]\n"
" if {[file exists $tclfile]} {\n"
" if {[catch {uplevel #0 [list source $tclfile]} msg opts]} {\n"
@@ -426,6 +425,7 @@ Tcl_Init(
" unset -nocomplain tclDefaultLibrary\n"
" return\n"
" }\n"
+" lappend dirs $tcl_library\n"
" }\n"
" unset -nocomplain tclDefaultLibrary\n"
" set msg \"Can't find a usable init.tcl in the following directories: \n\"\n"