aboutsummaryrefslogtreecommitdiffstats
path: root/watcher.go
diff options
context:
space:
mode:
Diffstat (limited to 'watcher.go')
-rw-r--r--watcher.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/watcher.go b/watcher.go
index 1ee3972..137bb36 100644
--- a/watcher.go
+++ b/watcher.go
@@ -89,11 +89,6 @@ func syncWrite(srcPath, destPath, relPath string, manifest *Manifest, dryRun boo
return
}
- meta, exists := manifest.Files[relPath]
- if exists && meta.Size == info.Size() && meta.Mode == info.Mode() && meta.ModTime.Equal(info.ModTime()) {
- return
- }
-
linkTarget := ""
if info.Mode()&os.ModeSymlink != 0 {
linkTarget, err = os.Readlink(srcPath)
@@ -103,6 +98,11 @@ func syncWrite(srcPath, destPath, relPath string, manifest *Manifest, dryRun boo
}
}
+ meta, exists := manifest.Files[relPath]
+ if exists && meta.Size == info.Size() && meta.Symlink == linkTarget {
+ return
+ }
+
manifest.Files[relPath] = FileMeta{
Size: info.Size(),
Mode: info.Mode(),