aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_vfs/src/io/watcher.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_vfs/src/io/watcher.rs')
-rw-r--r--crates/ra_vfs/src/io/watcher.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/ra_vfs/src/io/watcher.rs b/crates/ra_vfs/src/io/watcher.rs
index 1d7ce2136..ff6775f59 100644
--- a/crates/ra_vfs/src/io/watcher.rs
+++ b/crates/ra_vfs/src/io/watcher.rs
@@ -65,7 +65,7 @@ impl Watcher {
65 { 65 {
66 match res { 66 match res {
67 Ok(entry) => { 67 Ok(entry) => {
68 if entry.path().is_dir() { 68 if entry.file_type().is_dir() {
69 watch_one(self.watcher.as_ref(), entry.path()); 69 watch_one(self.watcher.as_ref(), entry.path());
70 } 70 }
71 } 71 }
@@ -172,11 +172,11 @@ impl WatcherWorker {
172 let filter = &self.roots[root]; 172 let filter = &self.roots[root];
173 for res in WalkDir::new(dir) 173 for res in WalkDir::new(dir)
174 .into_iter() 174 .into_iter()
175 .filter_entry(|entry| filter.can_contain(entry.path()).is_some()) 175 .filter_entry(filter.entry_filter())
176 { 176 {
177 match res { 177 match res {
178 Ok(entry) => { 178 Ok(entry) => {
179 if entry.path().is_dir() { 179 if entry.file_type().is_dir() {
180 watch_one(self.watcher.as_ref(), entry.path()); 180 watch_one(self.watcher.as_ref(), entry.path());
181 } else { 181 } else {
182 // emit only for files otherwise we will cause watch_recursive to be called again with a dir that we are already watching 182 // emit only for files otherwise we will cause watch_recursive to be called again with a dir that we are already watching