Skip to content

Commit 0ac525b

Browse files
zlib legacy decompress: call check_fix_size method
so we also have the decompressed size in the metadata.
1 parent 0cfdf6d commit 0ac525b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/borg/compress.pyx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,9 @@ class ZLIB_legacy(CompressorBase):
445445
meta["clevel"] = 255 # we do not know the compression level
446446
meta["csize"] = len(data)
447447
try:
448-
return meta, zlib.decompress(data)
448+
data = zlib.decompress(data)
449+
self.check_fix_size(meta, data)
450+
return meta, data
449451
except zlib.error as e:
450452
raise DecompressionError(str(e)) from None
451453

0 commit comments

Comments
 (0)