Skip to content

Commit

Permalink
Merge pull request #8404 from ThomasWaldmann/fix-build-files-cache
Browse files Browse the repository at this point in the history
cache: fix crash in _build_files_cache
  • Loading branch information
ThomasWaldmann authored Sep 21, 2024
2 parents b862f2b + e5e685f commit 4d8954e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/borg/cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,12 @@ def _build_files_cache(self):
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:
Expand Down

0 comments on commit 4d8954e

Please sign in to comment.