notify icon indicating copy to clipboard operation
notify copied to clipboard

Mac: `FSEvent` ignores hard links

Open emilk opened this issue 3 years ago • 2 comments

System details

  • Intel MacBook running macOS BIgSur 11.6
  • Using APFS
  • rustc --version: 1.57.0
  • Notify version: latest main

What you did (as detailed as you can)

  • Watch for changes in a directory using FsEventWatcher.
  • Create a file with touch foo.
  • Create a hard-link using ln foo bar

What you expected

I expect to get an Event for both actions.

What happened

Only the creation of foo is reported. Nothing happens when creating the hardlink-file (bar).

Investigation

I added some logging inside of src/fsevent.rs and I get no callback when creating the hard-link, so this is likely a problem with FSEvent, or how it is being used. I tried looking for some extra flag to pass into FSEventStreamCreate, but couldn't find anything suitable.

emilk avatar Dec 13 '21 10:12 emilk

On v5 you could test if the macos_kqueue feature gives you a better result using the kqueue backend.

0xpr03 avatar Dec 13 '21 10:12 0xpr03

According to this it could be an issue with fsevent itself.

0xpr03 avatar Dec 13 '21 10:12 0xpr03