notify
notify copied to clipboard
Moving subdirectory of recursive watch does not include to and from paths for Modify Name event
System details
- OS/Platform name and version: OSX 14.5
- Rust version (if building from source):
rustc --version: 1.80 - Notify version (or commit hash if building from git):
notify-debouncer-full = {version = "0.3.1", default-features = false}
notify = {version = "6.1.1", default-features = false, features = ["macos_kqueue"]}
Example usage:
https://github.com/eighty4/l3/blob/dev-mode/src/dev.rs#L107
What you did (as detailed as you can)
After setting up a recursive watch on a directory, doing a move directory dispatches a Modify(Name(Any)) and does not include a path for the directory's original path.
self.w.watcher().watch(PathBuf::from("routes"), RecursiveMode::Recursive)?;
mv routes/subdir routes/anotherdir
What you expected
I thought there would be enough context to react to the from path and to path for an operation like moving a directory.
What happened
Using this watch, I would never know that anotherdir was originally subdir, and the app would have to stat every previously tracked file to determine whether they were moved.