From b6b7ace44b08ea767247be331f2048aa1be577e8 Mon Sep 17 00:00:00 2001 From: apnadkarni Date: Tue, 3 Oct 2023 05:46:17 +0000 Subject: [PATCH] Locking patch from chw --- generic/tclZipfs.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/generic/tclZipfs.c b/generic/tclZipfs.c index 80aab6f3026..f55fa9d8542 100644 --- a/generic/tclZipfs.c +++ b/generic/tclZipfs.c @@ -1882,7 +1882,6 @@ ZipFSCatalogFilesystem( Tcl_Free(zf); return TCL_ERROR; } - Unlock(); /* * Convert to a real archive descriptor. @@ -2098,8 +2097,8 @@ ZipFSCatalogFilesystem( } Tcl_DStringFree(&fpBuf); Tcl_DStringFree(&ds); - Tcl_FSMountsChanged(NULL); Unlock(); + Tcl_FSMountsChanged(NULL); return TCL_OK; } @@ -4336,6 +4335,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. @@ -4370,7 +4370,6 @@ ZipChannelClose( z->offset = 0; z->crc32 = 0; } - WriteLock(); info->zipFilePtr->numOpen--; Unlock(); if (info->ubufToFree) {