From e02f8e879d4f5d37fcc6ff5880e3cc30f87da1e4 Mon Sep 17 00:00:00 2001 From: Cole Miller Date: Tue, 7 Oct 2025 12:30:02 -0400 Subject: [PATCH] don't remove watcher on linux Co-authored-by: Kate Co-authored-by: John --- crates/fs/src/fs_watcher.rs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/crates/fs/src/fs_watcher.rs b/crates/fs/src/fs_watcher.rs index 0d6d914ae4c0bc3f8b92ec9f8be67d92c9ac6b64..2af1a0d47cd310ab8ba65620f29313d0d081e28d 100644 --- a/crates/fs/src/fs_watcher.rs +++ b/crates/fs/src/fs_watcher.rs @@ -203,10 +203,13 @@ impl GlobalWatcher { state.path_registrations.remove(®istration_state.path); drop(state); - self.watcher - .lock() - .unwatch(®istration_state.path) - .log_err(); + + if !cfg!(target_os = "linux") { + self.watcher + .lock() + .unwatch(®istration_state.path) + .log_err(); + } } } }