Message31922
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). |
|
Date |
User |
Action |
Args |
2007-08-23 14:53:30 | admin | link | issue1710703 messages |
2007-08-23 14:53:30 | admin | create | |
|