mirror of
https://github.com/borgbackup/borg.git
synced 2026-05-28 04:03:21 -04:00
Merge pull request #7035 from ThomasWaldmann/fix-7034-1.2
check: fix uninitialised variable if repo is completely empty, fixes #7034
This commit is contained in:
commit
44b4791e98
1 changed files with 1 additions and 0 deletions
|
|
@ -1027,6 +1027,7 @@ class Repository:
|
|||
t_start = time.monotonic()
|
||||
pi = ProgressIndicatorPercent(total=segment_count, msg='Checking segments %3.1f%%', step=0.1,
|
||||
msgid='repository.check')
|
||||
segment = -1 # avoid uninitialized variable if there are no segment files at all
|
||||
for i, (segment, filename) in enumerate(self.io.segment_iterator()):
|
||||
pi.show(i)
|
||||
if segment <= last_segment_checked:
|
||||
|
|
|
|||
Loading…
Reference in a new issue