diff options
author | Bernardo <[email protected]> | 2019-01-21 20:48:07 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2019-01-26 08:46:27 +0000 |
commit | eeed6cf53b9f6112329cc8a274dcf63bce887c50 (patch) | |
tree | 8c94f012ea5ecfc3a899ce2a3b165e68ab9f8d17 /crates/ra_vfs/src/io | |
parent | 2a1afad3eda7d8c5635de6e7f524ed943cecc22b (diff) |
fix recursive watch
Diffstat (limited to 'crates/ra_vfs/src/io')
-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 { |