docs(watcher): state what changedSince can and cannot detect
CI / Lint / Test / Vet (pull_request) Successful in 1m4s
CI / Mirror to GitHub (pull_request) Skipped

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-19 21:09:13 +02:00
co-authored by Claude Sonnet 5.5
parent 97ec9e7ce8
commit e6e14102ee
2 changed files with 7 additions and 3 deletions
+4 -2
View File
@@ -217,8 +217,10 @@ func processFile(ctx context.Context, cfg Config, root *os.Root, rawDir, path, d
}
// changedSince reports whether the note at rel differs (size or mtime) from
// before. A note replaced mid-ingest (Syncthing) has newer content than the
// archive copy, so it must not be removed.
// before. A note replaced mid-ingest (Syncthing) was extracted from older
// content than it now holds, so it must not be removed. Limits: a same-size
// rewrite with a restored mtime is not detected (the new bytes then survive
// only in the archive copy), nor a change between this check and Remove.
func changedSince(root *os.Root, rel string, before os.FileInfo) bool {
now, err := root.Lstat(rel)
if err != nil {