-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Broken symlinks break directory watching #66
Comments
Are there any workarounds available? |
You may be able to filter these files out (not use |
The problem seems to be
This patch fixes the issue by checking if the file exists first https://github.com/Prillan/hfsnotify/commit/09720ff31126910e391ac49c90706bd7fe86e74c . I haven't run any rigorous tests on it, but it seems to work, and it definitely fixes the problem with broken links. |
@Prillan Did you mean |
@mitchellwrosen Yes, of course. I tested both and copied the wrong one. I've edited my previous post. |
Also note that the library currently doesn't follow symlinks when checking for updates. Example: Setup
Start the watcher in The following commands illustrate this point $ cd fsnotify-test/
$ touch files/test
<no output from watcher>
$ echo "ASDF" >> files/test
<no output from watcher>
$ echo "ASDF" >> links/test
<no output from watcher>
$ ln -s files/test links/test2
Added "/tmp/fsnotify-test/links/test2" 2016-08-09 21:09:36.370309 UTC
$ rm files/test
<no output from watcher>
$ rm links/test
Removed "/tmp/fsnotify-test/links/test" 2016-08-09 21:10:05.512831 UTC Note that the only actions output were the ones affecting the links themselves. Do you want me to create a separate issue on this? |
I just hit this issue also, would it be possible to merge @Prillan's patch to fix the broken symlink issue? In general, adding a (General question, is this repo still actively maintained?) |
It seems
stat
is called on every file in a directory tree prior to much else. If there's a dead symlink somewhere, it'll causewatchTree
& friends to throw an exception:The text was updated successfully, but these errors were encountered: