This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author markaflacy
Recipients
Date 2007-05-04.07:26:00
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
No wonder you're confused.  My description of how 2.4 worked was flat-out wrong; empty files opened as zip files will throw IOExceptions and have done so since 2.4 at least (I didn't look further back than that).  However, it *is* the case that 2.4 would correctly write the Central Directory entry on zipfile close for "w" and "a" modes, even for zip files that never had any entries written into them.

In 2.4, the ZipFile.close() method contains the line...

        if self.mode in ("w", "a"):             # write ending records

...while in 2.5, the test was changed to...

        if self.mode in ("w", "a") and self._didModify: # write ending records

That change was added in revision 46967 as part of the ZIP64 support and that change breaks backwards compatibility (as well as not making a lot of sense for the "w" case).
History
Date User Action Args
2007-08-23 14:53:30adminlinkissue1710703 messages
2007-08-23 14:53:30admincreate