Fix borg-check --verify-data failing with rebuilt objects

There are some instances where --repair would do something. In these
instances --verify-data would fail if --repair was not given also, since
the changes without --repair are only in the index, but not in the
repository.
This commit is contained in:
Marian Beermann 2016-07-28 18:41:08 +02:00
parent 1b6b0cfae6
commit d0ec7e76bb
1 changed files with 2 additions and 2 deletions

View File

@ -909,6 +909,8 @@ class ArchiveChecker:
self.repository = repository
self.init_chunks()
self.key = self.identify_key(repository)
if verify_data:
self.verify_data()
if Manifest.MANIFEST_ID not in self.chunks:
logger.error("Repository manifest not found!")
self.error_found = True
@ -916,8 +918,6 @@ class ArchiveChecker:
else:
self.manifest, _ = Manifest.load(repository, key=self.key)
self.rebuild_refcounts(archive=archive, last=last, prefix=prefix)
if verify_data:
self.verify_data()
self.orphan_chunks_check()
self.finish(save_space=save_space)
if self.error_found: