소스 검색

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

SecurityManager.known(): check all files, fixes #4614
TW 5 년 전
부모
커밋
08c3a6bd96
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  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():