|
@@ -920,11 +920,7 @@ Duration: {0.duration}
|
|
if not symlink:
|
|
if not symlink:
|
|
os.chmod(path, item.mode)
|
|
os.chmod(path, item.mode)
|
|
mtime = item.mtime
|
|
mtime = item.mtime
|
|
- if "atime" in item:
|
|
|
|
- atime = item.atime
|
|
|
|
- else:
|
|
|
|
- # old archives only had mtime in item metadata
|
|
|
|
- atime = mtime
|
|
|
|
|
|
+ atime = item.atime if "atime" in item else mtime
|
|
if "birthtime" in item:
|
|
if "birthtime" in item:
|
|
birthtime = item.birthtime
|
|
birthtime = item.birthtime
|
|
try:
|
|
try:
|
|
@@ -1119,10 +1115,11 @@ class MetadataCollector:
|
|
self.nobirthtime = nobirthtime
|
|
self.nobirthtime = nobirthtime
|
|
|
|
|
|
def stat_simple_attrs(self, st):
|
|
def stat_simple_attrs(self, st):
|
|
- attrs = dict(mode=st.st_mode, uid=st.st_uid, gid=st.st_gid, mtime=safe_ns(st.st_mtime_ns))
|
|
|
|
|
|
+ attrs = dict(mode=st.st_mode, uid=st.st_uid, gid=st.st_gid)
|
|
# borg can work with archives only having mtime (very old borg archives do not have
|
|
# borg can work with archives only having mtime (very old borg archives do not have
|
|
# atime/ctime). it can be useful to omit atime/ctime, if they change without the
|
|
# atime/ctime). it can be useful to omit atime/ctime, if they change without the
|
|
# file content changing - e.g. to get better metadata deduplication.
|
|
# file content changing - e.g. to get better metadata deduplication.
|
|
|
|
+ attrs["mtime"] = safe_ns(st.st_mtime_ns)
|
|
if not self.noatime:
|
|
if not self.noatime:
|
|
attrs["atime"] = safe_ns(st.st_atime_ns)
|
|
attrs["atime"] = safe_ns(st.st_atime_ns)
|
|
if not self.noctime:
|
|
if not self.noctime:
|