1
0
Fork 0
mirror of https://github.com/borgbackup/borg.git synced 2024-12-25 09:19:31 +00:00

implement cmdline metadata value decoding

code copied & adapted from Archive.load()
This commit is contained in:
Thomas Waldmann 2015-10-19 12:16:28 +02:00
parent af2f1f7861
commit 7d31da7914

View file

@ -820,7 +820,8 @@ def missing_chunk_detector(chunk_id):
archive = StableDict(msgpack.unpackb(data))
if archive[b'version'] != 1:
raise Exception('Unknown archive metadata version')
decode_dict(archive, (b'name', b'hostname', b'username', b'time')) # fixme: argv
decode_dict(archive, (b'name', b'hostname', b'username', b'time'))
archive[b'cmdline'] = [arg.decode('utf-8', 'surrogateescape') for arg in archive[b'cmdline']]
items_buffer = ChunkBuffer(self.key)
items_buffer.write_chunk = add_callback
for item in robust_iterator(archive):