Skip to content

Commit

Permalink
Locking patch from chw
Browse files Browse the repository at this point in the history
  • Loading branch information
apnadkarni committed Oct 3, 2023
1 parent b8c23f6 commit b6b7ace
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions generic/tclZipfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -1882,7 +1882,6 @@ ZipFSCatalogFilesystem(
Tcl_Free(zf);
return TCL_ERROR;
}
Unlock();

/*
* Convert to a real archive descriptor.
Expand Down Expand Up @@ -2098,8 +2097,8 @@ ZipFSCatalogFilesystem(
}
Tcl_DStringFree(&fpBuf);
Tcl_DStringFree(&ds);
Tcl_FSMountsChanged(NULL);
Unlock();
Tcl_FSMountsChanged(NULL);
return TCL_OK;
}

Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -4370,7 +4370,6 @@ ZipChannelClose(
z->offset = 0;
z->crc32 = 0;
}
WriteLock();
info->zipFilePtr->numOpen--;
Unlock();
if (info->ubufToFree) {
Expand Down

0 comments on commit b6b7ace

Please sign in to comment.