Examine file ctime when checking if files have changed.

This commit is contained in:
Courtney Bane
2019-03-19 20:27:37 -05:00
parent ecc2458de8
commit b8c2544dcb
7 changed files with 40 additions and 1 deletions

View File

@@ -453,8 +453,13 @@ func fileChanged(fi os.FileInfo, node *restic.Node, ignoreInode bool) bool {
return true
}
// check size
// check status change timestamp
extFI := fs.ExtendedStat(fi)
if !extFI.ChangeTime.Equal(node.ChangeTime) {
return true
}
// check size
if uint64(fi.Size()) != node.Size || uint64(extFI.Size) != node.Size {
return true
}