check: fail if single archive does not exist

This commit is contained in:
Marian Beermann 2017-01-04 19:25:03 +01:00
parent 73795f5a82
commit be8e0c89b3
2 changed files with 5 additions and 0 deletions

View File

@ -1107,6 +1107,10 @@ class ArchiveChecker:
archive_items = [item for item in self.manifest.archives.items() if item[0] == archive]
num_archives = 1
end = 1
if not archive_items:
logger.error('Archive %s does not exist', archive)
self.error_found = True
return
with cache_if_remote(self.repository) as repository:
for i, (name, info) in enumerate(archive_items[:end]):

View File

@ -136,6 +136,7 @@ Bug fixes:
- Fixed "borg upgrade --tam" crashing with unencrypted repositories. Since :ref:`the issue <tam_vuln>` is
not relevant for unencrypted repositories, it now does nothing and prints an error, #1981.
- Fixed change-passphrase crashing with unencrypted repositories, #1978
- Fixed "borg check repo::archive" indicating success if "archive" does not exist, #1997
Version 1.0.9 (2016-12-20)
--------------------------