[issue10694] zipfile.py end of central directory detection not robust

R. David Murray report at bugs.python.org
Tue Dec 21 23:45:06 CET 2010


R. David Murray <rdmurray at bitdance.com> added the comment:

Xuanji: thanks for taking a crack at the test.

Rather than adding another data file to the test directory, how about creating a zipfile using the zipfile module in the test, closing it, opening it as a file, writing the /r/n to it, and then opening it back up for read as a zipfile for the test.  That's more parallel to how the other zipfile tests work.

Given what we know I'd be inclined to accept Kevin's suggested fix, unless Alan speaks up against it.  In that case the test may as well check that the comment is what we expect, as well.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue10694>
_______________________________________


More information about the Python-bugs-list mailing list