From 53e0d3737652fa8bb15e592b3d23d97635a7e4b5 Mon Sep 17 00:00:00 2001 From: sebres Date: Wed, 13 Nov 2024 19:31:01 +0000 Subject: [PATCH] small amend: don't add empty dir to dirs var (error message) --- generic/tclInterp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/generic/tclInterp.c b/generic/tclInterp.c index aa7a0b30f49..8cf7162e4e5 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"