diff --git a/Cargo.lock b/Cargo.lock index a210d57c5..1ea30beb0 100644 Binary files a/Cargo.lock and b/Cargo.lock differ diff --git a/core/Cargo.toml b/core/Cargo.toml index d6091f536..fc8bbddb2 100644 --- a/core/Cargo.toml +++ b/core/Cargo.toml @@ -70,7 +70,7 @@ ctor = "0.1.23" globset = { version = "^0.4.9", features = ["serde1"] } itertools = "^0.10.5" enumflags2 = "0.7.5" -notify = { version = "5.0.0", default-features = false, features = ["macos_kqueue"], optional = true } +notify = { version = "5.0.0", default-features = false, features = ["macos_fsevent"], optional = true } uhlc = "0.5.1" [dev-dependencies] diff --git a/core/src/location/manager/watcher/mod.rs b/core/src/location/manager/watcher/mod.rs index 9cbd4921f..54097cdcc 100644 --- a/core/src/location/manager/watcher/mod.rs +++ b/core/src/location/manager/watcher/mod.rs @@ -409,7 +409,12 @@ mod tests { expect_event(events_rx, &file_path, EventKind::Modify(ModifyKind::Any)).await; #[cfg(target_os = "macos")] - expect_event(events_rx, &file_path, EventKind::Create(CreateKind::File)).await; + expect_event( + events_rx, + &file_path, + EventKind::Access(AccessKind::Close(AccessMode::Write)), + ) + .await; #[cfg(target_os = "linux")] expect_event( @@ -488,7 +493,7 @@ mod tests { expect_event( events_rx, &file_path, - EventKind::Modify(ModifyKind::Data(DataChange::Any)), + EventKind::Access(AccessKind::Close(AccessMode::Write)), ) .await; @@ -537,7 +542,7 @@ mod tests { expect_event( events_rx, &file_path, - EventKind::Modify(ModifyKind::Name(RenameMode::Any)), + EventKind::Modify(ModifyKind::Name(RenameMode::Both)), ) .await; @@ -588,7 +593,7 @@ mod tests { expect_event( events_rx, &dir_path, - EventKind::Modify(ModifyKind::Name(RenameMode::Any)), + EventKind::Modify(ModifyKind::Name(RenameMode::Both)), ) .await; @@ -627,12 +632,7 @@ mod tests { expect_event(events_rx, &file_path, EventKind::Remove(RemoveKind::Any)).await; #[cfg(target_os = "macos")] - expect_event( - events_rx, - &root_dir.path(), - EventKind::Modify(ModifyKind::Data(DataChange::Any)), - ) - .await; + expect_event(events_rx, &file_path, EventKind::Remove(RemoveKind::File)).await; #[cfg(target_os = "linux")] expect_event(events_rx, &file_path, EventKind::Remove(RemoveKind::File)).await; @@ -679,12 +679,7 @@ mod tests { expect_event(events_rx, &dir_path, EventKind::Remove(RemoveKind::Any)).await; #[cfg(target_os = "macos")] - expect_event( - events_rx, - &root_dir.path(), - EventKind::Modify(ModifyKind::Data(DataChange::Any)), - ) - .await; + expect_event(events_rx, &dir_path, EventKind::Remove(RemoveKind::Folder)).await; #[cfg(target_os = "linux")] expect_event(events_rx, &dir_path, EventKind::Remove(RemoveKind::Folder)).await;