rjeczalik / notify

File system event notification library on steroids.
MIT License
900 stars 128 forks source link

kqueue: Ignore errors due to dangling symlinks #193

Closed imsodin closed 3 years ago

imsodin commented 3 years ago

When recursively watching a directory that contains a symlink that points at nothing, it fails with error while traversing /usr/home/simon/Sync: no such file or directory. I first wanted to handle that by opening the symlink itself instead of following it, however it turns out that's not supported on BSDs (no O_SYMLINK). Ignoring and thus not watching the broken symlink seems more appropriate than failing the entire recursive watch operation.

imsodin commented 3 years ago

@rjeczalik Could you take a look please?

rjeczalik commented 3 years ago

@imsodin Looks good, thanks!