Closed merwaaan closed 3 years ago
Additional investigation shows that this actually happens when the file is not a direct child of the watched folder.
edit: the Add
event does not seem to work properly either.
Hi! Thanks for reporting this! The issue isn't exactly what you describe but it's pretty close. The exact issue is: the first time that occurs a file change since listening for changes from the file system, for some reason the OS is only reporting the folder change and not any file change, but only for the first time, and only when the change happened from a sub-directory of the originally watched directory. I'm currently investigating if there's an actual easy fix or I have to change the way the library watch folders recusivelly.
Thanks for the quick reply @SpartanJ ! I ran a few tests and renaming in sub-directories now works consistently.
However moving files in and from from sub-directories still has the same issue (Either the Add or Delete event is missing).
Your latests commits have fixed the issue. Thanks! 😀
Another issue that I just noticed is that copying a directory that contains a few files to the watched directory only generates an Add event for the copied directory and none for the files that it contains. I'm not sure if this is a bug or the expected behavior though.
Great to hear! I had to make some core changes, now should be much more precise. I'll keep this issue open for a couple of days while I continue testing them.
Regarding the other issue: that's the expected behavior, in that case, there are no added files, those files are already created, it's just a directory movement. In that case, you'll need to scan the new directory and add those files.
Hi, It seems that the
Actions::Moved
event is not triggered the very first time a watched file is renamed when we use the Win32 watcher.Steps to reproduce the issue:
Moved
events (but we get aModified
event for the parent folder)Moved
+ aModified
as expectedPlease note that this does NOT happen with the generic watcher implementation: instead it triggers
Add
andDelete
events but at least it does not miss the first one.