diff options
Diffstat (limited to 'crates/ra_vfs/src/io/watcher.rs')
-rw-r--r-- | crates/ra_vfs/src/io/watcher.rs | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/crates/ra_vfs/src/io/watcher.rs b/crates/ra_vfs/src/io/watcher.rs index 5e9bc8ff3..b370c5fbc 100644 --- a/crates/ra_vfs/src/io/watcher.rs +++ b/crates/ra_vfs/src/io/watcher.rs | |||
@@ -91,9 +91,14 @@ impl Watcher { | |||
91 | match res { | 91 | match res { |
92 | Ok(entry) => { | 92 | Ok(entry) => { |
93 | if entry.path().is_dir() { | 93 | if entry.path().is_dir() { |
94 | match self.watcher.watch(dir, RecursiveMode::NonRecursive) { | 94 | match self |
95 | Ok(()) => log::debug!("watching \"{}\"", dir.display()), | 95 | .watcher |
96 | Err(e) => log::warn!("could not watch \"{}\": {}", dir.display(), e), | 96 | .watch(entry.path(), RecursiveMode::NonRecursive) |
97 | { | ||
98 | Ok(()) => log::debug!("watching \"{}\"", entry.path().display()), | ||
99 | Err(e) => { | ||
100 | log::warn!("could not watch \"{}\": {}", entry.path().display(), e) | ||
101 | } | ||
97 | } | 102 | } |
98 | } | 103 | } |
99 | if emit_for_contents && entry.depth() > 0 { | 104 | if emit_for_contents && entry.depth() > 0 { |