Message254647
The _make_zipfile in shutil uses ZIP_DEFLATED compression by default, and the fix introduced by #24982 adds directory entries. In zipfile.ZipFile.write, directories is added as 0 file_size, 0 compress_size, regardless of the compression method. Deflate will compress an empty string as \x03\x00, thus the directory entries become incorrect.
The command line interface of zipfile is correct. Shutil can be fixed as zipfile.main. As a directory entry with compression methods other than ZIP_STORED is meaningless, zipfile.write and (maybe) zipfile.writestr should always write a ZIP_STORED header for directory entries to avoid the above problem occuring by programming mistakes. |
|
Date |
User |
Action |
Args |
2015-11-14 09:25:24 | gumblex | set | recipients:
+ gumblex |
2015-11-14 09:25:24 | gumblex | set | messageid: <1447493124.52.0.848319062026.issue25624@psf.upfronthosting.co.za> |
2015-11-14 09:25:24 | gumblex | link | issue25624 messages |
2015-11-14 09:25:24 | gumblex | create | |
|