Browse Source

Merge pull request #4646 from ThomasWaldmann/fix-4614-1.1

SecurityManager.known(): check all files, fixes #4614
TW 5 years ago
parent
commit
08c3a6bd96
1 changed files with 2 additions and 1 deletions
  1. 2 1
      src/borg/cache.py

+ 2 - 1
src/borg/cache.py

@@ -73,7 +73,8 @@ class SecurityManager:
             shutil.rmtree(path)
 
     def known(self):
-        return os.path.exists(self.key_type_file)
+        return all(os.path.exists(f)
+                   for f in (self.key_type_file, self.location_file, self.manifest_ts_file))
 
     def key_matches(self, key):
         if not self.known():