-
Notifications
You must be signed in to change notification settings - Fork 256
Description
System details
-
OS/Platform name and version: ubuntu 18.04
-
Rust version (if building from source):
rustc --version: 1.40.0 -
Notify version (or commit hash if building from git): the newest one(5.0.0-pre.2)
-
If you're coming from a project that makes use of Notify, what it is, and a link to the downstream issue if there is one:
-
Filesystem type and options:
-
On Linux: Kernel version: Linux wlan16 4.15.0-72-generic Watch only new directories in the monitor example #81-Ubuntu SMP Tue Nov 26 12:20:02 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
-
On Windows: version and if you're running under Windows, Cygwin (unsupported), Linux Subsystem:
-
If you're running as a privileged user (root, System): yeah, is root.
-
If you're running in a container, details on the runtime and overlay:
-
If you're running in a VM, details on the hypervisor:
What I did
I use the example in the git repository and want to hot watch a single file changed. I create a project and the src code is the same as the example:
https://github.com/notify-rs/notify/blob/main/examples/monitor_raw.rs
I create a singe file in the path "/root/watcher/aaa", then I run the process with argument "/root/watcher/aaa", then I use vim to write "www" into the file "aaa" twice times, only the first time have notfication, and the second times was ignored.
The log of first times I changed the file like that:
watching /root/watcher/aaa
changed: Event { kind: Modify(Name(From)), paths: ["/root/watcher/aaa"], attr:tracker: None, attr:flag: None, attr:info: None, attr:source: None }
changed: Event { kind: Modify(Metadata(Any)), paths: ["/root/watcher/aaa"], attr:tracker: None, attr:flag: None, attr:info: None, attr:source: None }
changed: Event { kind: Remove(File), paths: ["/root/watcher/aaa"], attr:tracker: None, attr:flag: None, attr:info: None, attr:source: None }
The second times I changed the file no any log