Procházet zdrojové kódy

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

SecurityManager.known(): check all files, fixes #4614
TW před 5 roky
rodič
revize
08c3a6bd96
1 změnil soubory, kde provedl 2 přidání a 1 odebrání
  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():