Commits

Anonymous committed 1e23d91

Mark Favas points out that there's an 'self.fp.flush()' call in the
ZipFile.close() method that should be part of the preceding 'if'
block. On some platforms (Mark noticed this on FreeBSD 4.2) doing a
flush() on a file open for reading is not allowed.

Comments (0)

Files changed (1)

             endrec = struct.pack(structEndArchive, stringEndArchive,
                      0, 0, count, count, pos2 - pos1, pos1, 0)
             self.fp.write(endrec)
-        self.fp.flush()
+            self.fp.flush()
         if not self._filePassed:
             self.fp.close()
         self.fp = None