From bc1c5ddf2ebbb74dd2e2bc2d4a7a24c75edf6877 Mon Sep 17 00:00:00 2001 From: Alexander Larsson Date: Tue, 22 Oct 2013 11:13:24 +0200 Subject: [PATCH] Fix typo that made change detection break We were comparing the old and old mtimes rather than the old and the new. This meant we missed some file changes where only the mtime changed. --- changes.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changes.go b/changes.go index 765dca77b6..95e86399d0 100644 --- a/changes.go +++ b/changes.go @@ -119,7 +119,7 @@ func (info *FileInfo) addChanges(oldInfo *FileInfo, changes *[]Change) { // breaks down is if some code intentionally hides a change by setting // back mtime oldMtime := syscall.NsecToTimeval(oldStat.Mtim.Nano()) - newMtime := syscall.NsecToTimeval(oldStat.Mtim.Nano()) + newMtime := syscall.NsecToTimeval(newStat.Mtim.Nano()) if oldStat.Mode != newStat.Mode || oldStat.Uid != newStat.Uid || oldStat.Gid != newStat.Gid ||