From f7ef674f2901ba374608cbc44287d2917e0f862f Mon Sep 17 00:00:00 2001 From: Thomas Waldmann Date: Tue, 28 Jun 2022 15:22:58 +0200 Subject: [PATCH] fix memoryview/bytes issue in upgrader --- src/borg/upgrade.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/borg/upgrade.py b/src/borg/upgrade.py index 2f88d791f..1dfef64ec 100644 --- a/src/borg/upgrade.py +++ b/src/borg/upgrade.py @@ -73,10 +73,10 @@ def upgrade_compressed_chunk(self, *, chunk): def upgrade_zlib_and_level(chunk): if ZLIB_legacy.detect(chunk): ctype = ZLIB.ID - chunk = ctype + level + chunk # get rid of the attic legacy: prepend separate type/level bytes + chunk = ctype + level + bytes(chunk) # get rid of the attic legacy: prepend separate type/level bytes else: - ctype = chunk[0:1] - chunk = ctype + level + chunk[2:] # keep type same, but set level + ctype = bytes(chunk[0:1]) + chunk = ctype + level + bytes(chunk[2:]) # keep type same, but set level return chunk ctype = chunk[0:1]