From 089ea36b2ecf5d7267f8a671c077357aad50b8e2 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Wed, 24 Jun 2020 17:11:07 +0200 Subject: Don't watch dirs if not asked to --- crates/vfs-notify/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crates/vfs-notify') diff --git a/crates/vfs-notify/src/lib.rs b/crates/vfs-notify/src/lib.rs index 5b4978285..2e60fe23b 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)?; -- cgit v1.2.3