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

Event::Modify raised twice on Mac M1 #15

Closed
Alphapage opened this issue Jul 23, 2023 · 3 comments · May be fixed by #16
Closed

Event::Modify raised twice on Mac M1 #15

Alphapage opened this issue Jul 23, 2023 · 3 comments · May be fixed by #16

Comments

@Alphapage
Copy link

Hello,

I try the example without success: the event is always raised twice when I save the file.

It was working at the beginning, but now it seems broken.
I restarted my Mac without success.

Do you have the same behaviour ?

Thank you in advance for your help.

@francesca64
Copy link
Owner

Thank you for reporting this! Does #15 fix this for you?

@Alphapage
Copy link
Author

No: I get 2 events:

  • notify::event::RenameMode::Any
  • notify::event::MetadataKind::Extended
    but no Modify::Data

@Alphapage
Copy link
Author

Well, it seems RenameMode::Any is raised to signal a modification from the file.
But then Mac OS raises a Metadata event because it is updating the modification time I think.
So, I inserted those lines to bypass this problem:

if let EventKind::Modify(ModifyKind::Metadata(_)) =
                            event.kind
                        {
                            return;
                        }

because I don't need any metadata event for now.

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 a pull request may close this issue.

2 participants