Merge Eray's filesize fix from #7247. Without this "unzip -l"

shows the uncompressed size information of the file as 0.
This commit is contained in:
Faik Uygur
2006-04-21 08:58:04 +00:00
parent 0827e642e3
commit 50f54fc544
+1
View File
@@ -251,6 +251,7 @@ class ZipFileExt(ZipFile):
# So in order to calculate the CRC, we are going to read
# all the file at once until it is implemented.
buf = fp.read()
file_size = len(buf)
CRC = binascii.crc32(buf, CRC)
compressed = pylzma.compress(buf, eos=1)
self.fp.write(compressed)