Commit 6e4f7a82 authored by Andrew M. Kuchling's avatar Andrew M. Kuchling

[Bug #812325 ] tarfile.close() can write out more bytes to the output

   than are specified by the buffer size.  The patch calls .__write()
   to ensure that any full blocks are written out.
parent b914ef0a
......@@ -353,6 +353,7 @@ class _Stream:
if self.mode == "w" and self.buf:
if self.type != "tar":
self.buf += self.cmp.flush()
self.__write("") # Write remaining blocks to output
self.fileobj.write(self.buf)
self.buf = ""
if self.type == "gz":
......
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