@@ -13,12 +13,8 @@ set tcl_libPath [list $tcl_library [file join $mountpoint lib]] # the following code only gets executed once on startup if {[info exists ::TCLKIT_INITVFS]} { - catch { - load {} vfs - } - # lookup and emulate "source" of lib/vfs/{vfs*.tcl,mk4vfs.tcl} switch -- $::tclKitStorage { "mk4" { # must use raw MetaKit calls because VFS is not yet in place @@ -136,8 +132,13 @@ set tcl_library [file join $mountpoint lib tcl$tcl_version] set tcl_libPath [list $tcl_library [file join $mountpoint lib]] vfs::filesystem mount $mountpoint $vfsHandler + + # This loads everything needed for "clock scan" to work + # "clock scan" is used within "vfs::zip", which may be + # loaded before this is run causing the root VFS to break + catch { clock scan } } # load config settings file if present namespace eval ::vfs { variable tclkit_version 1 } @@ -148,13 +149,8 @@ # reset auto_path, so that init.tcl's search outside of tclkit is cancelled set auto_path $tcl_libPath - # This loads everything needed for "clock scan" to work - # "clock scan" is used within "vfs::zip", which may be - # loaded before this is run causing the root VFS to break - catch { clock scan } - if {$::TCLKIT_TYPE == "kitdll"} { # Set a maximum seek to avoid reading the entire file looking for a # zip header catch { @@ -167,9 +163,9 @@ if {[info exists ::TCLKIT_INITVFS] && [info exists ::tclKitFilename]} { catch { vfs::zip::Mount $::tclKitFilename "/.KITDLL_USER" - lappend auto_path [file normalize "/.KITDLL_USER/lib"] + lappend auto_path "/.KITDLL_USER/lib" } } ## Mount the VFS from executable @@ -176,12 +172,11 @@ if {[info exists ::TCLKIT_INITVFS]} { catch { vfs::zip::Mount [info nameofexecutable] "/.KITDLL_APP" - lappend auto_path [file normalize "/.KITDLL_APP/lib"] + lappend auto_path "/.KITDLL_APP/lib" } } - } # Clean up unset -nocomplain ::zip::max_header_seek