mirror of
https://github.com/borgbackup/borg.git
synced 2025-01-30 11:11:28 +00:00
parent
59077e5bf5
commit
e7740458cd
1 changed files with 6 additions and 2 deletions
|
@ -219,10 +219,14 @@ def prepare_txn(self, transaction_id, do_cleanup=True):
|
|||
self.io.cleanup(transaction_id)
|
||||
with open(os.path.join(self.path, 'hints.%d' % transaction_id), 'rb') as fd:
|
||||
hints = msgpack.unpack(fd)
|
||||
if hints[b'version'] != 1:
|
||||
hints_version = hints[b'version']
|
||||
if hints_version not in (1, 2):
|
||||
raise ValueError('Unknown hints file version: %d' % hints['version'])
|
||||
self.segments = hints[b'segments']
|
||||
self.compact = set(hints[b'compact'])
|
||||
if hints_version == 1:
|
||||
self.compact = set(hints[b'compact'])
|
||||
elif hints_version == 2:
|
||||
self.compact = set(hints[b'compact'].keys())
|
||||
|
||||
def write_index(self):
|
||||
hints = {b'version': 1,
|
||||
|
|
Loading…
Reference in a new issue