From 203cb25e4116ab68dd3316e0c06465262de0d6fc Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Thu, 10 Aug 2017 11:38:39 +0200 Subject: [PATCH] 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. --- deltatar/tarfile.py | 1 + testing/test_recover.py | 80 +++++++++++++++++++++++++++++++++++++++------- 2 files changed, 68 insertions(+), 13 deletions(-) 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"