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 rfk
Recipients rfk
Date 2010-07-12.23:56:43
SpamBayes Score 0.00056677783
Marked as misclassified No
Message-id <1278979006.42.0.00730549521889.issue9239@psf.upfronthosting.co.za>
In-reply-to
Content
If you open a ZipFile in append mode and modify the comment to be shorter than what was originally there, the file will become corrupted.  Truncated data from the original comment is left "dangling" at the end of the zipfile.

A much more trivial bug discovered while writing tests for this: setting the "comment" attribute doesn't mark the zipfile as modified, so the change won't be written out unless you also modify one of the archive files.

The attached patch fixes (and adds tests for) these issues.
History
Date User Action Args
2010-07-12 23:56:46rfksetrecipients: + rfk
2010-07-12 23:56:46rfksetmessageid: <1278979006.42.0.00730549521889.issue9239@psf.upfronthosting.co.za>
2010-07-12 23:56:44rfklinkissue9239 messages
2010-07-12 23:56:44rfkcreate