You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The watch remains on the moved folder, but still reports the old path
Expected
Either:
The watch is removed when the folder is moved
The reported path is the folder's new path
I see the latter is an open TODO https://github.com/notify-rs/notify/blob/main/notify/src/inotify.rs#L271, though for what its worth I personally would expect the watch to get removed like what happens for MOVED_FROM events, rather than getting events for a path I didn't set a watch on. But I can work wither either behaviour :).
The text was updated successfully, but these errors were encountered:
On Linux, kernel 6.5.13 but probably applies to all versions. No VM/root/container/etc, ext4 filesystem.
Notify version 6.1.1.
Repro steps
gives the following output:
[2024-01-18T03:32:45Z TRACE notify::inotify] adding inotify watch: /tmp/.tmpx60Uvj/from
[2024-01-18T03:32:45Z TRACE notify::inotify] inotify event: Event { wd: WatchDescriptor { id: 2, fd: (Weak) }, mask: MOVE_SELF, cookie: 0, name: None }
[2024-01-18T03:32:45Z TRACE icros::server::fs::fs_watcher] Got event: Ok(Event { kind: Modify(Name(From)), paths: ["/tmp/.tmpx60Uvj/from"], attr:tracker: None, attr:flag: None, attr:info: None, attr:source: None })
[2024-01-18T03:32:45Z TRACE notify::inotify] inotify event: Event { wd: WatchDescriptor { id: 2, fd: (Weak) }, mask: CREATE | ISDIR, cookie: 0, name: Some("should_not_appear") }
[2024-01-18T03:32:45Z TRACE icros::server::fs::fs_watcher] Got event: Ok(Event { kind: Create(Folder), paths: ["/tmp/.tmpx60Uvj/from/should_not_appear"], attr:tracker: None, attr:flag: None, attr:info: None, attr:source: None })
Outcome
The watch remains on the moved folder, but still reports the old path
Expected
Either:
I see the latter is an open TODO https://github.com/notify-rs/notify/blob/main/notify/src/inotify.rs#L271, though for what its worth I personally would expect the watch to get removed like what happens for
MOVED_FROM
events, rather than getting events for a path I didn't set a watch on. But I can work wither either behaviour :).The text was updated successfully, but these errors were encountered: