windows: Fix performance issues after trashing or deleting a folder (#27498)

Closes #25247

Since the upstream `Notify` repo hasn't merged the related PR yet, this
is basically a temporary patch to work around it.

Release Notes:

- N/A
This commit is contained in:
张小白 2025-03-26 23:20:09 +08:00 committed by GitHub
parent 9a2dfa687d
commit d232150d67
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 36 additions and 52 deletions

View file

@ -40,7 +40,7 @@ objc = "0.2"
cocoa = "0.26"
[target.'cfg(not(target_os = "macos"))'.dependencies]
notify = "6.1.1"
notify = { git = "https://github.com/zed-industries/notify.git", rev = "bbb9ea5ae52b253e095737847e367c30653a2e96" }
[target.'cfg(target_os = "windows")'.dependencies]
windows.workspace = true

View file

@ -38,6 +38,9 @@ impl Watcher for FsWatcher {
EventKind::Create(_) => Some(PathEventKind::Created),
EventKind::Modify(_) => Some(PathEventKind::Changed),
EventKind::Remove(_) => Some(PathEventKind::Removed),
// Adding this fix a weird bug on Linux after upgrading notify
// https://github.com/zed-industries/zed/actions/runs/14085230504/job/39449448832
EventKind::Access(_) => return,
_ => None,
};
let mut path_events = event