mirror of
https://github.com/borgbackup/borg.git
synced 2024-12-27 02:08:54 +00:00
--files-cache=size: fix crash, fixes #7658
This commit is contained in:
parent
4326813c05
commit
ec1f2dfbf1
1 changed files with 3 additions and 0 deletions
|
@ -1049,6 +1049,9 @@ def memorize_file(self, hashed_path, path_hash, st, ids):
|
||||||
elif "m" in cache_mode:
|
elif "m" in cache_mode:
|
||||||
cmtime_type = "mtime"
|
cmtime_type = "mtime"
|
||||||
cmtime_ns = safe_ns(st.st_mtime_ns)
|
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(
|
entry = FileCacheEntry(
|
||||||
age=0, inode=st.st_ino, size=st.st_size, cmtime=int_to_timestamp(cmtime_ns), chunk_ids=ids
|
age=0, inode=st.st_ino, size=st.st_size, cmtime=int_to_timestamp(cmtime_ns), chunk_ids=ids
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue