Skip to content

bpo-34606: decode extra data only if zip64 end of central directory record is present#9107

Closed
vladima wants to merge 3 commits into
python:masterfrom
vladima:fix34606
Closed

bpo-34606: decode extra data only if zip64 end of central directory record is present#9107
vladima wants to merge 3 commits into
python:masterfrom
vladima:fix34606

Conversation

@vladima

@vladima vladima commented Sep 7, 2018

Copy link
Copy Markdown
Contributor

During compression extra data is encoded conditionally when Zip64 extension is enabled but decoding used to to unconditional which lead to attempts to decode data that was not encoded in the first place.

https://bugs.python.org/issue34606

@auvipy auvipy left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good otherwise

Comment thread Lib/test/test_zipfile.py
rmtree(TESTFN2)

@requires_zlib
def test_extra_field(self):

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just curious, is it possible to use Pathlib here?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see why not, I've picked os.path.join for uniformity just to follow the pattern used in other tests - if Pathlib is preferable option, I can change my code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants