From 50f54fc5448f679336792bf47d275c33f4a5c41d Mon Sep 17 00:00:00 2001 From: Faik Uygur Date: Fri, 21 Apr 2006 08:58:04 +0000 Subject: [PATCH] Merge Eray's filesize fix from #7247. Without this "unzip -l" shows the uncompressed size information of the file as 0. --- pisi/zipfileext.py | 1 + 1 file changed, 1 insertion(+) diff --git a/pisi/zipfileext.py b/pisi/zipfileext.py index 57171a1b..60e6b93b 100644 --- a/pisi/zipfileext.py +++ b/pisi/zipfileext.py @@ -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)