diff --git a/borg/archive.py b/borg/archive.py index baf212337..afc734cef 100644 --- a/borg/archive.py +++ b/borg/archive.py @@ -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]): diff --git a/docs/changes.rst b/docs/changes.rst index 301246004..a26e0040a 100644 --- a/docs/changes.rst +++ b/docs/changes.rst @@ -136,6 +136,7 @@ Bug fixes: - Fixed "borg upgrade --tam" crashing with unencrypted repositories. Since :ref:`the issue ` 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) --------------------------