sync tarfile stream diligently when writing new objects
authorPhilipp Gesang <philipp.gesang@intra2net.com>
Fri, 11 Aug 2017 08:25:12 +0000 (10:25 +0200)
committerThomas Jarosch <thomas.jarosch@intra2net.com>
Mon, 2 Apr 2018 11:34:09 +0000 (13:34 +0200)
commit0349168a809b5ea0a2082325de34a3cdb5899d0c
tree9a25ea4d337e69d1ba1806bae087116086c70ef4
parent00b8c150153165ff5eeb8eaee3c65160df8baefd
sync tarfile stream diligently when writing new objects

Turns out all the offsets written to the index when neither
encrypting nor compressing were, well, … off. In fact they would
only be updated at tar block boundaries due to buffering. Since
“last_block_offset” record keeping blatantly violates layering
boundaries, it would only work reliably with the concat
compression and encryption modes that do the same.

Sync when adding a new object so we get the accurate offset
value. Voilà, recovery now works with uncompressed and
unencrypted archives as well
deltatar/deltatar.py
deltatar/tarfile.py
runtests.py
testing/test_recover.py