diff --git a/crates/vfs-notify/src/lib.rs b/crates/vfs-notify/src/lib.rs index 5b4978285b..2e60fe23bd 100644 --- a/crates/vfs-notify/src/lib.rs +++ b/crates/vfs-notify/src/lib.rs @@ -199,7 +199,7 @@ impl LoaderActor { let is_dir = entry.file_type().is_dir(); let is_file = entry.file_type().is_file(); let abs_path = AbsPathBuf::try_from(entry.into_path()).unwrap(); - if is_dir { + if is_dir && watch { self.watch(abs_path.clone()); } let rel_path = abs_path.strip_prefix(&path)?;