Skip to content

Ensure paths reported by a single callback are unique - #56

Merged
shikokuchuo merged 1 commit into
mainfrom
fix/unique-callback-paths
Oct 12, 2026
Merged

shikokuchuo merged 1 commit into
mainfrom
fix/unique-callback-paths

Conversation

@shikokuchuo

Copy link
Copy Markdown
Member

Fixes #55.

A single file change can trigger multiple filesystem events, which were each passed through as a separate path — duplicates carried no information since only paths are surfaced to R.

  • Enables libfswatch event bubbling by default and deduplicates paths in process_events(), keeping the first occurrence
  • Consolidates the path copy into a single allocation, replacing per-path malloc/free

watcher() docs updated to note that paths reported by a single callback are always unique.

@shikokuchuo
shikokuchuo merged commit 2b89c92 into main Oct 12, 2026
11 checks passed
@shikokuchuo
shikokuchuo deleted the fix/unique-callback-paths branch October 12, 2026 09:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

watched file is duplicated in callback in certain cases

1 participant