瀏覽代碼

work around missing size/nfiles archive metadata, fixes #8491

Thomas Waldmann 7 月之前
父節點
當前提交
cea2d5809d
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      src/borg/manifest.py

+ 2 - 2
src/borg/manifest.py

@@ -149,8 +149,8 @@ class Archives:
                 exists=True,  # repo has a valid archive item
                 username=archive_item.username,
                 hostname=archive_item.hostname,
-                size=archive_item.size,
-                nfiles=archive_item.nfiles,
+                size=archive_item.get("size", 0),
+                nfiles=archive_item.get("nfiles", 0),
                 comment=archive_item.comment,  # not always present?
                 tags=tuple(sorted(getattr(archive_item, "tags", []))),  # must be hashable
             )