mirror of
https://github.com/borgbackup/borg.git
synced 2026-06-13 10:50:21 -04:00
--files-cache=size: fix crash, fixes #7658
This commit is contained in:
parent
f73eb5c6c2
commit
45aa88dbec
1 changed files with 3 additions and 0 deletions
|
|
@ -1046,6 +1046,9 @@ class LocalCache(CacheStatsMixin):
|
|||
elif 'm' in cache_mode:
|
||||
cmtime_type = 'mtime'
|
||||
cmtime_ns = safe_ns(st.st_mtime_ns)
|
||||
else: # neither 'c' nor 'm' in cache_mode, avoid UnboundLocalError
|
||||
cmtime_type = 'ctime'
|
||||
cmtime_ns = safe_ns(st.st_ctime_ns)
|
||||
entry = FileCacheEntry(age=0, inode=st.st_ino, size=st.st_size, cmtime=int_to_bigint(cmtime_ns), chunk_ids=ids)
|
||||
self.files[path_hash] = msgpack.packb(entry)
|
||||
self._newest_cmtime = max(self._newest_cmtime or 0, cmtime_ns)
|
||||
|
|
|
|||
Loading…
Reference in a new issue