summaryrefslogtreecommitdiffstats
path: root/generic/tclZipfs.c
diff options
context:
space:
mode:
authortne <tne>2017-11-21 01:14:05 (GMT)
committertne <tne>2017-11-21 01:14:05 (GMT)
commitd7b40297d2ec40549321631ce061f496a14b4f46 (patch)
treeee1bd17de41486053bc7702baa2c3b96632840df /generic/tclZipfs.c
parent9ef614086a2b3267669f4fb644ad1a92debb5fb0 (diff)
downloadtcl-d7b40297d2ec40549321631ce061f496a14b4f46.zip
tcl-d7b40297d2ec40549321631ce061f496a14b4f46.tar.gz
tcl-d7b40297d2ec40549321631ce061f496a14b4f46.tar.bz2
Final tweaks to make "./tclsh install" work properly on Windows
NOTE: We still seem to be screwing up minizip on MinGW. the `find . -type f` substitution is not working
Diffstat (limited to 'generic/tclZipfs.c')
-rw-r--r--generic/tclZipfs.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/generic/tclZipfs.c b/generic/tclZipfs.c
index 2e24afe..a954dd6 100644
--- a/generic/tclZipfs.c
+++ b/generic/tclZipfs.c
@@ -4059,11 +4059,13 @@ int TclZipfs_AppHook(int *argc, char ***argv)
if(strcmp(archive,"install")==0) {
/* If the first argument is mkzip, run the mkzip program */
Tcl_Obj *vfsinitscript;
-
- vfsinitscript=Tcl_NewStringObj(ZIPFS_ZIP_MOUNT "/tcl_library/install.tcl",-1);
- Tcl_IncrRefCount(vfsinitscript);
/* Run this now to ensure the file is present by the time Tcl_Main wants it */
TclZipfs_TclLibrary();
+ vfsinitscript=Tcl_NewStringObj(ZIPFS_ZIP_MOUNT "/tcl_library/install.tcl",-1);
+ Tcl_IncrRefCount(vfsinitscript);
+ if(Tcl_FSAccess(vfsinitscript,F_OK)==0) {
+ Tcl_SetStartupScript(vfsinitscript,NULL);
+ }
return TCL_OK;
} else {
if(!TclZipfs_Mount(NULL, archive, ZIPFS_APP_MOUNT, NULL)) {