aboutsummaryrefslogtreecommitdiffstats
path: root/watcher.go
diff options
context:
space:
mode:
Diffstat (limited to 'watcher.go')
-rw-r--r--watcher.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/watcher.go b/watcher.go
index 137bb36..284c3fa 100644
--- a/watcher.go
+++ b/watcher.go
@@ -99,7 +99,8 @@ func syncWrite(srcPath, destPath, relPath string, manifest *Manifest, dryRun boo
}
meta, exists := manifest.Files[relPath]
- if exists && meta.Size == info.Size() && meta.Symlink == linkTarget {
+ srcHash := hashFile(srcPath)
+ if exists && meta.Size == info.Size() && meta.Symlink == linkTarget && (srcHash == 0 || meta.Hash == srcHash) {
return
}
@@ -108,6 +109,7 @@ func syncWrite(srcPath, destPath, relPath string, manifest *Manifest, dryRun boo
Mode: info.Mode(),
ModTime: info.ModTime(),
Symlink: linkTarget,
+ Hash: srcHash,
}
if dryRun {