This commit is contained in:
Jeremy Soller 2024-03-13 14:05:49 -06:00
commit dc3c4eb731
No known key found for this signature in database
GPG key ID: D02FD439211AF56F
2 changed files with 18 additions and 8 deletions

View file

@ -1466,13 +1466,18 @@ impl Application for App {
move |event_res: Result<notify::Event, notify::Error>| match event_res { move |event_res: Result<notify::Event, notify::Error>| match event_res {
Ok(event) => { Ok(event) => {
match &event.kind { match &event.kind {
notify::EventKind::Access(_) notify::EventKind::Access(_) => {
| notify::EventKind::Modify(
notify::event::ModifyKind::Metadata(_),
) => {
// Data not mutated // Data not mutated
return; return;
} }
notify::EventKind::Modify(
notify::event::ModifyKind::Metadata(e),
) if (*e != notify::event::MetadataKind::Any
&& *e != notify::event::MetadataKind::WriteTime) =>
{
// Data not mutated nor modify time changed
return;
}
_ => {} _ => {}
} }

View file

@ -666,13 +666,18 @@ impl Application for App {
move |event_res: Result<notify::Event, notify::Error>| match event_res { move |event_res: Result<notify::Event, notify::Error>| match event_res {
Ok(event) => { Ok(event) => {
match &event.kind { match &event.kind {
notify::EventKind::Access(_) notify::EventKind::Access(_) => {
| notify::EventKind::Modify(
notify::event::ModifyKind::Metadata(_),
) => {
// Data not mutated // Data not mutated
return; return;
} }
notify::EventKind::Modify(
notify::event::ModifyKind::Metadata(e),
) if (*e != notify::event::MetadataKind::Any
&& *e != notify::event::MetadataKind::WriteTime) =>
{
// Data not mutated nor modify time changed
return;
}
_ => {} _ => {}
} }