mirror of
https://github.com/python/cpython.git
synced 2025-11-25 21:11:09 +00:00
Fix bug #1543303, tarfile adds padding that breaks gunzip.
Patch # 1543897. Will backport to 2.5
This commit is contained in:
parent
271d59343b
commit
8a519392d5
2 changed files with 21 additions and 3 deletions
|
|
@ -411,9 +411,6 @@ class _Stream:
|
|||
self.buf += self.cmp.flush()
|
||||
|
||||
if self.mode == "w" and self.buf:
|
||||
blocks, remainder = divmod(len(self.buf), self.bufsize)
|
||||
if remainder > 0:
|
||||
self.buf += NUL * (self.bufsize - remainder)
|
||||
self.fileobj.write(self.buf)
|
||||
self.buf = ""
|
||||
if self.comptype == "gz":
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue