aboutsummaryrefslogtreecommitdiff
path: root/crates/vfs-notify
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2020-06-24 16:11:07 +0100
committerAleksey Kladov <[email protected]>2020-06-24 16:11:07 +0100
commit089ea36b2ecf5d7267f8a671c077357aad50b8e2 (patch)
treef235bc9d229feda0490f2e10fb4373dcee8e071c /crates/vfs-notify
parent1a3b507a007d0373a83bde203d780b860ea55ce1 (diff)
Don't watch dirs if not asked to
Diffstat (limited to 'crates/vfs-notify')
-rw-r--r--crates/vfs-notify/src/lib.rs2
1 files changed, 1 insertions, 1 deletions
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 {
199 let is_dir = entry.file_type().is_dir(); 199 let is_dir = entry.file_type().is_dir();
200 let is_file = entry.file_type().is_file(); 200 let is_file = entry.file_type().is_file();
201 let abs_path = AbsPathBuf::try_from(entry.into_path()).unwrap(); 201 let abs_path = AbsPathBuf::try_from(entry.into_path()).unwrap();
202 if is_dir { 202 if is_dir && watch {
203 self.watch(abs_path.clone()); 203 self.watch(abs_path.clone());
204 } 204 }
205 let rel_path = abs_path.strip_prefix(&path)?; 205 let rel_path = abs_path.strip_prefix(&path)?;