[Bug #822668] tarfile raises an exception if the tarfile is gzipped and is too large; the gzip filesize should be written out mod 2**32. (Reported by Johan Fredrik Ohman)
This commit is contained in:
parent
1b3c04b510
commit
10a444965d
|
@ -357,7 +357,7 @@ class _Stream:
|
||||||
self.buf = ""
|
self.buf = ""
|
||||||
if self.type == "gz":
|
if self.type == "gz":
|
||||||
self.fileobj.write(struct.pack("<l", self.crc))
|
self.fileobj.write(struct.pack("<l", self.crc))
|
||||||
self.fileobj.write(struct.pack("<L", self.pos))
|
self.fileobj.write(struct.pack("<L", self.pos & 0xffffFFFFL))
|
||||||
|
|
||||||
if not self._extfileobj:
|
if not self._extfileobj:
|
||||||
self.fileobj.close()
|
self.fileobj.close()
|
||||||
|
|
Loading…
Reference in New Issue