1
0
Fork 0
mirror of https://github.com/borgbackup/borg.git synced 2025-01-03 05:35:58 +00:00

Merge pull request #8404 from ThomasWaldmann/fix-build-files-cache

cache: fix crash in _build_files_cache
This commit is contained in:
TW 2024-09-22 01:34:21 +02:00 committed by GitHub
commit 4d8954ecbb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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: