diff options
author | apnadkarni <apnmbx-wits@yahoo.com> | 2023-10-03 06:38:06 (GMT) |
---|---|---|
committer | apnadkarni <apnmbx-wits@yahoo.com> | 2023-10-03 06:38:06 (GMT) |
commit | 13bccc613010fcef78026aa046fe0a888e0c01d5 (patch) | |
tree | 5d810b40d7b5e7cfee4217b89cab3f8be1bb45a6 /generic | |
parent | 56f57b382a880a2b3d6e4acd7202431f5e7e65cc (diff) | |
download | tcl-13bccc613010fcef78026aa046fe0a888e0c01d5.zip tcl-13bccc613010fcef78026aa046fe0a888e0c01d5.tar.gz tcl-13bccc613010fcef78026aa046fe0a888e0c01d5.tar.bz2 |
Backport locking patch from chw
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tclZipfs.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/generic/tclZipfs.c b/generic/tclZipfs.c index 1aec819..57021bd 100644 --- a/generic/tclZipfs.c +++ b/generic/tclZipfs.c @@ -1897,7 +1897,6 @@ ZipFSCatalogFilesystem( ckfree(zf); return TCL_ERROR; } - Unlock(); /* * Convert to a real archive descriptor. @@ -2113,8 +2112,8 @@ ZipFSCatalogFilesystem( } Tcl_DStringFree(&fpBuf); Tcl_DStringFree(&ds); - Tcl_FSMountsChanged(NULL); Unlock(); + Tcl_FSMountsChanged(NULL); return TCL_OK; } @@ -4350,6 +4349,7 @@ ZipChannelClose( info->isEncrypted = 0; memset(info->keys, 0, sizeof(info->keys)); } + WriteLock(); if (info->isWriting) { /* * Copy channel data back into original file in archive. @@ -4384,7 +4384,6 @@ ZipChannelClose( z->offset = 0; z->crc32 = 0; } - WriteLock(); info->zipFilePtr->numOpen--; Unlock(); if (info->ubufToFree) { |