mirror of
https://github.com/octoleo/restic.git
synced 2024-11-26 06:46:34 +00:00
windows: Use LastWriteTime for ctime and mtime
Windows does not have a concept of a `change time` in the sense as Unix has it: the field `CreationTime` of the `Win32FileAttributeData` struct is not updated when attributes or content is changed. So from now on we're using the `LastWriteTime` as the `change time` on Windows.
This commit is contained in:
parent
6e2fe73189
commit
355db0bc29
@ -76,5 +76,6 @@ func (s statWin) mtim() syscall.Timespec {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (s statWin) ctim() syscall.Timespec {
|
func (s statWin) ctim() syscall.Timespec {
|
||||||
return syscall.NsecToTimespec(s.CreationTime.Nanoseconds())
|
// Windows does not have the concept of a "change time" in the sense Unix uses it, so we're using the LastWriteTime here.
|
||||||
|
return syscall.NsecToTimespec(s.LastWriteTime.Nanoseconds())
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user