From: Philipp Gesang Date: Thu, 10 Aug 2017 09:38:39 +0000 (+0200) Subject: properly damage gzip files for recover test X-Git-Tag: v2.2~7^2~87 X-Git-Url: http://developer.intra2net.com/git/?a=commitdiff_plain;h=203cb25e4116ab68dd3316e0c06465262de0d6fc;p=python-delta-tar properly damage gzip files for recover test Ensure we are flipping bits in the compressed payload, not in the mostly useless header. Requires some extra parsing to determine the header length. --- diff --git a/deltatar/tarfile.py b/deltatar/tarfile.py index 288ac47..d67b4fd 100644 --- a/deltatar/tarfile.py +++ b/deltatar/tarfile.py @@ -116,6 +116,7 @@ PAX_FORMAT = 2 # POSIX.1-2001 (pax) format DEFAULT_FORMAT = GNU_FORMAT GZ_FMT_HEADER = b"