diff options
author | Aleksey Kladov <[email protected]> | 2020-06-24 16:11:07 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2020-06-24 16:11:07 +0100 |
commit | 089ea36b2ecf5d7267f8a671c077357aad50b8e2 (patch) | |
tree | f235bc9d229feda0490f2e10fb4373dcee8e071c | |
parent | 1a3b507a007d0373a83bde203d780b860ea55ce1 (diff) |
Don't watch dirs if not asked to
-rw-r--r-- | crates/vfs-notify/src/lib.rs | 2 |
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)?; |