-
Notifications
You must be signed in to change notification settings - Fork 229
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
changes in regular files pointed by symbolic links are not tracked #381
Comments
Duplicate of #255 |
I'm sorry but I think that these two issues are a little bit different, using the workaround described in that PR didn't work for this issue. I think the other issue is more about trying to watch dead symlinks. In this case, IN_DONT_FOLLOW is not needed. For now, I had to do this morenol@93a9bd1 |
Hm yeah, so the problem is that we'd need an option whether to resolve symlinks if I'm following this correctly. |
Yes, so basically if I have a folder /var/log/container/ with the logs off all the containers:
But they are actually symlinks to the logs from the containers:
If I watch on |
Thanks to those working on and considering this. Notable to me anyway, is that one side-impact of this is that any application using this library to auto-reload on config changes fails to work properly with Nix/NixOS/Home-Manager and require special application level workarounds. (In some cases, applications don't have an alternative). |
System details
Ubuntu 20.04
rustc --version
:rustc 1.58.0 (02072b482 2022-01-11)
0faae41
I am trying to use notify to keep track of changes in files but they are symlinks to regular files. I noticed that when using symlinks to directories everything works as expected since
walkdir
iterates follows the symlinks and call add_watch on them but the symbolic links to files are being ignored and in any place of the code we are calling add_watch.What you did (as detailed as you can)
I have this:
---> README.md
---> a.d/
---------> a.txt
----------> b (-> ../README.md)
And I used this crate to track events on a/. If I change the README.md content I dont get any events
What you expected
I would expect that any file that is linked by a symlink should be tracked
What happened
I dont get any events on files pointed by symlinks
I think that we could solve this issue if we change
filter_dir
to also allow symlinks when they point to regular filesnotify/src/inotify.rs
Line 560 in 0faae41
The text was updated successfully, but these errors were encountered: