Skip to content

Fix FSEvents kind and action decoding#14725

Merged
rgrinberg merged 1 commit into
ocaml:mainfrom
rgrinberg:push-zxoxswmqpsxz
May 26, 2026
Merged

Fix FSEvents kind and action decoding#14725
rgrinberg merged 1 commit into
ocaml:mainfrom
rgrinberg:push-zxoxswmqpsxz

Conversation

@rgrinberg
Copy link
Copy Markdown
Member

The kind decoder only treated MustScanSubDirs as Dir_and_descendants when ItemIsDir was also set, so subtree invalidations without ItemIsDir were reported as File.

The action decoder tested action bits in priority order, so events with multiple action bits set, such as Created+Modified or Removed+Renamed, were reported as a single action instead of Unknown.

Decode these cases in the C stubs using the SDK flag constants, and cover the decoder with an inline library test using C-provided flag examples.

@rgrinberg rgrinberg force-pushed the push-zxoxswmqpsxz branch 9 times, most recently from 546228a to c829c47 Compare May 26, 2026 08:32
The kind decoder only treated MustScanSubDirs as Dir_and_descendants when
ItemIsDir was also set, so subtree invalidations without ItemIsDir were
reported as File.

The action decoder tested action bits in priority order, so events with multiple
action bits set, such as Created+Modified or Removed+Renamed, were reported as
a single action instead of Unknown.

Decode these cases in the C stubs using the SDK flag constants, and cover the
decoder with an inline library test using C-provided flag examples.

Signed-off-by: Rudi Grinberg <me@rgrinberg.com>
@rgrinberg rgrinberg force-pushed the push-zxoxswmqpsxz branch from c829c47 to e2cd1ca Compare May 26, 2026 09:07
@rgrinberg rgrinberg merged commit 51b8290 into ocaml:main May 26, 2026
30 of 31 checks passed
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.

1 participant