notify
                                
                                 notify copied to clipboard
                                
                                    notify copied to clipboard
                            
                            
                            
                        Recursive changes aren't detected in a shared directory
System details
- OS/Platform name and version: Microsoft Windows 10 Entreprise Version10.0.19042 build 19042
- Rust version : 1.56.1
- Notify version : 4.0.17
- Filesystem type and options: NTFS, Windows Server, (by Huawei)
- I have read/write access + ability to give others read/write access
- Tested running both normal and as administrator
What you did (as detailed as you can)
Trying to recursively watch a shared directory using even just the example code provided in the repo.
What you expected
To get notified for all the changes (create/delete/modified...) in the directory I choose and all it's subdirectories.
What happened
Changes on the root of the watched directory get detected, but not changes in the nested directories. This problem is specific to this one shared directory (Huawei). For example I tested in both another shared directory from another windows 10 machine and I had no issue. I tested on a synology NAS (mounted again from my windows 10 machine) and no issue. I know this issue will be hard to reproduce in other environments, but I wonder if you might have an idea what could be causing it, and if there is a way to by pass that? like is there a way to force poll watching in windows for example ?
Hm that's indeed hard to reproduce, "huawei" ist just one specific directory name I'd guess ? What do you mean with shared directory ? Is that some kind of special "mount" thing like SD card / handy / camera? Because these tend to have their special rules (like not being able to create new top folders, no auto-refresh in windows explorer etc.
What I mean by shared directory is basically a storage accessed through network, can be accessed by multiple users. And yes it can be mounted to a drive. In the past I had a similar setup watching a shared folder on a synology NAS for example, and that had no issue. I know non local directories can't always be perfectly supported. I thought this recursive issue could ring a bell to someone. In any case, very aweosme job to all the work done in this library, the performance and footprint is amazing comparing to anything I tried before. Regarding my other question, since even I have hard time reproducing this issue elsewhere, is it possible to force poll watching as a fallback method on windows?
force poll watching
That'd be the poll watcher
For now we're still using the v4 version, but I suppose that would still work the same.
In the past I had a similar setup
Also with notify ?
Yeah with this crate exactly, notify, worked pretty well, detecting recursive changes. Actually, there was one thing strange, when mounting with NFS, I could only detect changes done by me, and when I switched to SMB (the synology NAS supported both) I was able to detect all changes even done by others. Maybe that's something interesting to note.
For now we're still using the v4 version, but I suppose that would still work the same
It's the same in v4 https://docs.rs/notify/4.0.17/notify/poll/index.html
Yeah with this crate exactly
So the question is what kind of change happened. Whether it's anotify regression etc
So the question is what kind of change happened. Whether it's anotify regression etc
No I no think this is a notify regression, not from all I tested, this looks like some specific FileSystem or Windows issue.
With further testing I found that recursive does work but only with one depth. Meaning :
If I watch dir/to/watch with multiple depths (ex : dir/to/watch/depth1/depth2)
├── dir/to/watch <-- changes here are detected
│           ├──/depth1 <--- changes here are detected
│                 └── /depth2 <--- changes here and beyond are not detected
Maybe I should update the title (recursive not detected beyond one depth).
That's very strange
I will post back here whenever I get any new information or details to help reproduce or better comprehend this issue.
I have the same behavior on linux ( Ubuntu server 20.04 ).
@IlTeo285 could you post an MVP for reproducing this ?