Files
spacedrive/crates
Jamie Pine 3cfe8eaee6 Deliver watcher events in the spelling the index is keyed on
macOS reaches the writable disk twice. /Users/me and
/System/Volumes/Data/Users/me are the same directory joined by a firmlink,
realpath does not resolve firmlinks, and FSEvents subscribes to exactly one
of the two. Spacedrive resolves a source root through its volume's mount
point, so the spelling it asks for is the one that does not work.

The outbound half of that translation existed: watchable_spelling rewrote the
path handed to FSEvents. The inbound half did not, so events came back in
FSEvents' spelling and never matched a watched root. find_by_path missed and
the watcher built a second tree beside the one the walk had already built.

Both halves now live in one module. /usr/share/firmlinks publishes the
mapping, so a watch resolves to a set of subscriptions, each carrying the
prefix its events are rewritten back to. Above the watcher edge only one
spelling exists, and the two calls to watchable_spelling in the ephemeral
handler collapse back to comparing paths.

A watch on the whole Data volume fans out. /System/Volumes/Data has no short
spelling of its own, so it subscribes to each firmlink beneath it instead;
this is Macintosh HD, which received nothing at all before.

a_watch_on_the_long_spelling_delivers_under_it drives a real watch end to
end. Both halves were checked by removing them: without the outbound rewrite
nothing arrives, without the inbound one the path arrives in the wrong
spelling. It watches a directory under $HOME because a temp directory will
not do — /var/folders is reached through a symlink rather than a firmlink and
FSEvents refuses its resolved spelling, which is a separate quirk.
2026-08-26 01:38:09 -07:00
..
2025-12-10 15:27:26 -08:00
2026-01-31 19:12:52 -05:00
2026-08-21 13:47:42 -07:00