Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support watching the same inode through multiple paths. #573

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

hugwijst
Copy link

@hugwijst hugwijst commented Mar 8, 2024

Support watching the same inode through multiple paths.

As a single change event can now refer to multiple paths, use "path groups" for renames to differentiate sources and destinations.

Fixes #572.

As a single change event can now refer to multiple paths, use "path
groups" for renames to differentiate sources and destinations.

Fixes notify-rs#572.
/// in distinct groups.
///
/// If there are different path groups, the `path_group_split_index` attribute indicates the
/// first index with paths in the second group.
pub paths: Vec<PathBuf>,
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As this is a behavioral change, we probably want some kind of API change so users explicitly decide how to handle multiple paths in one group, or this newly introduced concept of 2 different groups.

I didn't want to break this into two separate vectors, as to not increase the size of the Event struct. Maybe we should make paths private and have a fn path_groups(&self) -> (&[PathBuf], Option<&[PathBuf]>) method?

@hugwijst
Copy link
Author

hugwijst commented Apr 3, 2024

Ping @dfaust, @0xpr03. I'm wondering if there is a less intrusive solution?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

inotify: files pointed at by multiples symlinks generate events only for one path
1 participant