diff options
| author | Bernhard Guillon <Bernhard.Guillon@begu.org> | 2026-07-07 23:12:53 +0200 |
|---|---|---|
| committer | Bernhard Guillon <Bernhard.Guillon@begu.org> | 2026-07-07 23:12:53 +0200 |
| commit | 2850cd0c3156cdeb42594664cc087641fe740236 (patch) | |
| tree | ed8189345675087d0a7da9546d68dc9b4a0806d9 /watcher.go | |
| parent | 4cb0b6cde565291bee4c7d094ea0d0d7fa4f26ce (diff) | |
| download | sourcewatch-2850cd0c3156cdeb42594664cc087641fe740236.tar.gz sourcewatch-2850cd0c3156cdeb42594664cc087641fe740236.zip | |
Compare only size+symlink for sync — mode and modtime are unreliable across NTFS→Docker volume
Diffstat (limited to 'watcher.go')
| -rw-r--r-- | watcher.go | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -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(), |
