Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/vfs-notify/src/lib.rs')
| -rw-r--r-- | crates/vfs-notify/src/lib.rs | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/crates/vfs-notify/src/lib.rs b/crates/vfs-notify/src/lib.rs index a28cb7a330..960d988a4c 100644 --- a/crates/vfs-notify/src/lib.rs +++ b/crates/vfs-notify/src/lib.rs @@ -83,10 +83,9 @@ impl NotifyActor { self.watcher = None; if !config.watch.is_empty() { let (watcher_sender, watcher_receiver) = unbounded(); - let watcher = - log_notify_error(RecommendedWatcher::new_immediate(move |event| { - watcher_sender.send(event).unwrap() - })); + let watcher = log_notify_error(RecommendedWatcher::new(move |event| { + watcher_sender.send(event).unwrap() + })); self.watcher = watcher.map(|it| (it, watcher_receiver)); } @@ -215,7 +214,7 @@ impl NotifyActor { fn watch(&mut self, path: AbsPathBuf) { if let Some((watcher, _)) = &mut self.watcher { - log_notify_error(watcher.watch(&path, RecursiveMode::NonRecursive)); + log_notify_error(watcher.watch(path.as_ref(), RecursiveMode::NonRecursive)); } } fn send(&mut self, msg: loader::Message) { |