Repository navigation
ext/zip: use ZIP_RDONLY when calling zip_open() in zip_stream.c - #23976
Merged
Merged
Conversation
Member
|
The Windows CI seems related. |
DanielEScherzer
force-pushed
the
zip-read-only
branch
from
September 29, 2026 19:37
89bc33c to
c87f57e
Compare
DanielEScherzer
force-pushed
the
zip-read-only
branch
from
October 19, 2026 19:57
c87f57e to
bc16b94
Compare
LamentXU123
approved these changes
Oct 20, 2026
LamentXU123
left a comment
Member
There was a problem hiding this comment.
Thank you. Will do the merge work later I have time to look at this again :)
A follow-up commit will switch the uses of the `ZIP_CREATE` to instead use `ZIP_RDONLY` when creation is not desired; add tests to confirm that doing so does not change the actual behavior of the extension.
The code paths that call `zip_open()` are used for stats and reading, not writing. Previously `ZIP_CREATE` would create an in-memory zip archive, and if it were written to, would persist it to disk when closed, but since the archive was never written to, this functionality was unneeded. Use the `ZIP_RDONLY` flag to make it clearer that the zip archive is not being written to.
DanielEScherzer
force-pushed
the
zip-read-only
branch
from
October 23, 2026 01:00
bc16b94 to
1ea3508
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The code paths that call
zip_open()are used for stats and reading, not writing. PreviouslyZIP_CREATEwould create an in-memory zip archive, and if it were written to, would persist it to disk when closed, but since the archive was never written to, this functionality was unneeded. Use theZIP_RDONLYflag to make it clearer that the zip archive is not being written to.