mirror of
https://github.com/restic/restic.git
synced 2024-12-23 00:07:25 +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
1 changed files with 2 additions and 1 deletions
|
@ -76,5 +76,6 @@ func (s statWin) mtim() 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 a new issue