From 2b5c3d0c257600455599a4975c786ee2c0b8c10f Mon Sep 17 00:00:00 2001 From: Jamie Dumont Date: Fri, 18 Oct 2024 18:28:11 +0100 Subject: [PATCH] Handle file events emitted by Nova on macOS (#2674) --- src/fs_utils.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/fs_utils.rs b/src/fs_utils.rs index 9cd3da8a75..6530de437f 100644 --- a/src/fs_utils.rs +++ b/src/fs_utils.rs @@ -35,6 +35,10 @@ pub type MeaningfulEvent = (PathBuf, PathBuf, SimpleFileSystemEventKind); /// return `None`. fn get_relevant_event_kind(event_kind: &EventKind) -> Option { 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) }