Browse Source

cache: fix crash in _build_files_cache

Thomas Waldmann 8 months ago
parent
commit
e5e685fd1f
1 changed files with 6 additions and 1 deletions
  1. 6 1
      src/borg/cache.py

+ 6 - 1
src/borg/cache.py

@@ -432,7 +432,12 @@ class FilesCacheMixin:
                     self._newest_path_hashes.add(path_hash)
                 # add the file to the in-memory files cache
                 entry = FileCacheEntry(
-                    item.get("inode", 0), item.size, int_to_timestamp(ctime_ns), int_to_timestamp(mtime_ns), item.chunks
+                    age=0,
+                    inode=item.get("inode", 0),
+                    size=item.size,
+                    ctime=int_to_timestamp(ctime_ns),
+                    mtime=int_to_timestamp(mtime_ns),
+                    chunks=item.chunks,
                 )
                 files[path_hash] = msgpack.packb(entry)  # takes about 240 Bytes per file
         # deal with special snapshot / timestamp granularity case, see FAQ: