mirror of
https://github.com/borgbackup/borg.git
synced 2025-01-01 12:45:34 +00:00
extract: support extraction of atime/mtime on win32
This commit is contained in:
parent
9e534c1929
commit
7786cc7cb4
1 changed files with 10 additions and 0 deletions
|
@ -984,6 +984,16 @@ def restore_attrs(self, path, item, symlink=False, fd=None):
|
|||
set_flags(path, item.bsdflags, fd=fd)
|
||||
except OSError:
|
||||
pass
|
||||
else: # win32
|
||||
# set timestamps rather late
|
||||
mtime = item.mtime
|
||||
atime = item.atime if "atime" in item else mtime
|
||||
try:
|
||||
# note: no fd support on win32
|
||||
os.utime(path, None, ns=(atime, mtime))
|
||||
except OSError:
|
||||
# some systems don't support calling utime on a symlink
|
||||
pass
|
||||
|
||||
def set_meta(self, key, value):
|
||||
metadata = self._load_meta(self.id)
|
||||
|
|
Loading…
Reference in a new issue