From 2edcd2313501fb7f741c6a900404d188cd13490e Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Thu, 20 Apr 2017 17:53:49 +0200 Subject: [PATCH] =?utf8?q?initialize=20compression=20globally=20for=20non-=E2=80=9Cconcat=E2=80=9D=20archives?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- deltatar/tarfile.py | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) 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": -- 1.7.1