Before this patch, watching a nonexistent path using inotify backend would give an ErrorKind::Io variant. This behavior was inconsistent with other backends.
I am not sure if this is expected but taking #110 into consideration I think the path error ought to be consistent.
Run the inotify watcher on Linux:
let error = watcher.watch(Path::new("/nonexistent"), notify::RecursiveMode::Recursive).unwrap_err();
Before:
Error { kind: Io(Os { code: 2, kind: NotFound, message: "No such file or directory" }), paths: [] }
Before this patch, watching a nonexistent path using inotify backend would give an
ErrorKind::Io
variant. This behavior was inconsistent with other backends.I am not sure if this is expected but taking #110 into consideration I think the path error ought to be consistent.
Run the inotify watcher on Linux:
Before:
After: