Skip to content

Commit

Permalink
Handle file events emitted by Nova on macOS (#2674)
Browse files Browse the repository at this point in the history
  • Loading branch information
jamiedumont authored Oct 18, 2024
1 parent ad79860 commit 2b5c3d0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/fs_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ pub type MeaningfulEvent = (PathBuf, PathBuf, SimpleFileSystemEventKind);
/// return `None`.
fn get_relevant_event_kind(event_kind: &EventKind) -> Option<SimpleFileSystemEventKind> {
match event_kind {
// Nova on macOS reports this as it's final event on change
EventKind::Modify(ModifyKind::Name(RenameMode::Any)) => {
Some(SimpleFileSystemEventKind::Modify)
}
EventKind::Create(CreateKind::File) | EventKind::Create(CreateKind::Folder) => {
Some(SimpleFileSystemEventKind::Create)
}
Expand Down

0 comments on commit 2b5c3d0

Please sign in to comment.