1
0
Fork 0
mirror of https://github.com/borgbackup/borg.git synced 2025-02-21 13:47:16 +00:00

repository: fix compactable space computation for empty segment file

This commit is contained in:
Thomas Waldmann 2022-01-22 01:28:40 +01:00
parent f4b9f63856
commit 57e0724108

View file

@ -930,7 +930,7 @@ def _update_index(self, segment, objects, report=None):
else:
report(msg)
if self.segments[segment] == 0:
self.compact[segment] += self.io.segment_size(segment)
self.compact[segment] = self.io.segment_size(segment)
def _rebuild_sparse(self, segment):
"""Rebuild sparse bytes count for a single segment relative to the current index."""