Watcher gaps: overflow, startup window, cache inside photo root #3

closed cmc opened this on 2026-09-26 00:28 UTC

Discussion

cmc 2026-09-26 00:28 UTC
  • library.Watch: fsnotify.ErrEventOverflow on w.Errors is logged but does not reset the debounce timer, so dropped changes wait for the next event. Reset the timer on overflow.
  • Files added between the initial Scan and Watch registration in cmd/gallery/main.go are not picked up until another change. Register the watcher before the first scan, or rescan once after registering.
  • -cache set to a non-hidden subdirectory of -photos loops forever: every Scan rewrites meta.json, which triggers another rescan. Reject that configuration at startup or ignore events under the cache path.
  • A runtime w.Add failure for a new directory is only logged.

closed by cmc in commit 2893c158e9: Fix v1 follow-ups (!3)

2026-09-26 19:08 UTC