Tcl Library Source Code

Artifact [f7cdc4a2b3]
Login

Artifact f7cdc4a2b3a10a95efdf6626bace02fada4126c69564a1473c4f309cf0793ccd:

Attachment "default_path.patch" to ticket [e5f3dfc055] added by marc_culler 2025-06-09 02:55:25. (unpublished)
Index: installer.tcl
==================================================================
--- installer.tcl
+++ installer.tcl
@@ -293,12 +293,16 @@
 	if {[string match [info nameofexecutable]* [info library]]} {
 	    # Starkit
 	    set libdir [file join [file dirname [file dirname [info nameofexecutable]]] lib]
 	} else {
 	    # Unwrapped.
-	    if {[catch {set libdir [lindex $::tcl_pkgPath end]}]} {
-		set libdir [file dirname [info library]]
+	    foreach path $::auto_path {
+		if {[string match "^//zipfs:" $path]} {
+		    continue
+		}
+		set libdir $path
+		break
 	    }
 	}
 
 	set basedir [file dirname $libdir]
 	set bindir  [file join $basedir bin]