Kaydet (Commit) f85af612 authored tarafından Guido van Rossum's avatar Guido van Rossum

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.
üst 3024bb6e
...@@ -468,7 +468,7 @@ class ZipFile: ...@@ -468,7 +468,7 @@ class ZipFile:
endrec = struct.pack(structEndArchive, stringEndArchive, endrec = struct.pack(structEndArchive, stringEndArchive,
0, 0, count, count, pos2 - pos1, pos1, 0) 0, 0, count, count, pos2 - pos1, pos1, 0)
self.fp.write(endrec) self.fp.write(endrec)
self.fp.flush() self.fp.flush()
if not self._filePassed: if not self._filePassed:
self.fp.close() self.fp.close()
self.fp = None self.fp = None
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment