mirror of
https://github.com/borgbackup/borg.git
synced 2024-12-25 17:27:31 +00:00
transfer: fix csize/psize for obfuscated chunks
This commit is contained in:
parent
36e852457a
commit
bca36db0a1
1 changed files with 2 additions and 0 deletions
|
@ -123,8 +123,10 @@ def upgrade_zlib_and_level(meta, data):
|
|||
csize = borg1_header_fmt.unpack(csize_bytes)
|
||||
compressed = data[2 + hlen : 2 + hlen + csize]
|
||||
meta, compressed = upgrade_zlib_and_level(meta, compressed)
|
||||
meta["psize"] = csize
|
||||
osize = len(data) - 2 - hlen - csize # amount of 0x00 bytes appended for obfuscation
|
||||
data = compressed + bytes(osize)
|
||||
meta["csize"] = len(data)
|
||||
else:
|
||||
meta, data = upgrade_zlib_and_level(meta, data)
|
||||
return meta, data
|
||||
|
|
Loading…
Reference in a new issue