diff --git a/src/fs_utils.rs b/src/fs_utils.rs index 1f70496c..693b4e53 100644 --- a/src/fs_utils.rs +++ b/src/fs_utils.rs @@ -38,8 +38,7 @@ fn get_relevant_event_kind(event_kind: &EventKind) -> Option { Some(SimpleFileSystemEventKind::Create) } - EventKind::Modify(ModifyKind::Data(DataChange::Size)) - | EventKind::Modify(ModifyKind::Data(DataChange::Content)) + EventKind::Modify(ModifyKind::Data(_)) // Intellij modifies file metadata on edit. // https://github.com/passcod/notify/issues/150#issuecomment-494912080 | EventKind::Modify(ModifyKind::Metadata(MetadataKind::WriteTime)) @@ -181,6 +180,14 @@ mod tests { EventKind::Modify(ModifyKind::Data(DataChange::Content)), Some(SimpleFileSystemEventKind::Modify), ), + ( + EventKind::Modify(ModifyKind::Data(DataChange::Any)), + Some(SimpleFileSystemEventKind::Modify), + ), + ( + EventKind::Modify(ModifyKind::Data(DataChange::Other)), + Some(SimpleFileSystemEventKind::Modify), + ), ( EventKind::Modify(ModifyKind::Metadata(MetadataKind::WriteTime)), Some(SimpleFileSystemEventKind::Modify), @@ -202,7 +209,7 @@ mod tests { ]; for (case, expected) in cases.iter() { let ek = get_relevant_event_kind(&case); - assert_eq!(ek, *expected); + assert_eq!(ek, *expected, "case: {:?}", case); } }