From: Philipp Gesang Date: Thu, 20 Apr 2017 15:53:49 +0000 (+0200) Subject: initialize compression globally for non-“concat” archives X-Git-Tag: v2.2~7^2~158 X-Git-Url: http://developer.intra2net.com/git/?a=commitdiff_plain;h=2edcd2313501fb7f741c6a900404d188cd13490e;p=python-delta-tar initialize compression globally for non-“concat” archives --- diff --git a/deltatar/tarfile.py b/deltatar/tarfile.py index a2d21c4..aef4faf 100644 --- a/deltatar/tarfile.py +++ b/deltatar/tarfile.py @@ -464,7 +464,9 @@ class _Stream: self.zlib = zlib if mode == "r": self._init_read_gz() - self.exception = zlib.error # XXX what for? seems unused + self.exception = zlib.error + elif mode == "w" and concat_stream is False: + self._new_gz_block() self.crc = zlib.crc32(b"") & 0xFFFFffff elif comptype == "bz2":