aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_vfs/src/watcher.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_vfs/src/watcher.rs')
-rw-r--r--crates/ra_vfs/src/watcher.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_vfs/src/watcher.rs b/crates/ra_vfs/src/watcher.rs
index d8c35f2a3..606935891 100644
--- a/crates/ra_vfs/src/watcher.rs
+++ b/crates/ra_vfs/src/watcher.rs
@@ -87,7 +87,7 @@ impl Watcher {
87 &mut self, 87 &mut self,
88 dir: &Path, 88 dir: &Path,
89 filter_entry: impl Fn(&DirEntry) -> bool, 89 filter_entry: impl Fn(&DirEntry) -> bool,
90 emit_for_existing: bool, 90 emit_for_contents: bool,
91 ) { 91 ) {
92 for res in WalkDir::new(dir).into_iter().filter_entry(filter_entry) { 92 for res in WalkDir::new(dir).into_iter().filter_entry(filter_entry) {
93 match res { 93 match res {
@@ -98,7 +98,7 @@ impl Watcher {
98 Err(e) => log::warn!("could not watch \"{}\": {}", dir.display(), e), 98 Err(e) => log::warn!("could not watch \"{}\": {}", dir.display(), e),
99 } 99 }
100 } 100 }
101 if emit_for_existing { 101 if emit_for_contents && entry.depth() > 0 {
102 // emit as create because we haven't seen it yet 102 // emit as create because we haven't seen it yet
103 if let Err(e) = 103 if let Err(e) =
104 self.sender 104 self.sender