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

cache: fix crash in _build_files_cache

This commit is contained in:
Thomas Waldmann 2024-09-22 00:36:30 +02:00
parent b862f2b95f
commit e5e685fd1f
No known key found for this signature in database
GPG key ID: 243ACFA951F78E01

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: