watchdog icon indicating copy to clipboard operation
watchdog copied to clipboard

question about fsevents _is_recursive_event logic and moved events

Open splmatto opened this issue 3 years ago • 0 comments

I'm using various flavors of macOS (e.g. 12.5.1) and watchdog v2.1.7.

I've configured a watchdog observer to watch a path non-recursively. When I move a file from the watched path to a subfolder of the watched path I get a 'moved' event.

Since the 'moved' event only include a dest_path, I wasn't expecting to receive the event for moves targeting the subfolder.

The impl added at [1] short-circuits the dest_path check for file and dir moved events once the src_path condition is satisfied.

I was hoping the maintainer(s) could clarify the intended behavior and update the docs or modify the implementation if these notifications aren't intended.

[1] https://github.com/gorakhargosh/watchdog/pull/779/files#diff-71baba5aa3a56d7f119abfd0e52f29a9cbc2073325515cb52a0b37dda98db00eR107

splmatto avatar Sep 01 '22 16:09 splmatto