diff options
author | Luca Casonato <hello@lcas.dev> | 2021-09-02 23:38:44 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-02 23:38:44 +0200 |
commit | 1bf7b90ca8ad8e2bf62e455c24d5498c9ee74a46 (patch) | |
tree | e92ed4d8cce51a38d8e728e5d4108edca018231d /runtime/ops/fs_events.rs | |
parent | c84532b6d5a424694c519260f0cf407b1d8ba604 (diff) |
chore: update dependencies (#11856)
Co-authored-by: Bartek IwaĆczuk <biwanczuk@gmail.com>
Diffstat (limited to 'runtime/ops/fs_events.rs')
-rw-r--r-- | runtime/ops/fs_events.rs | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/runtime/ops/fs_events.rs b/runtime/ops/fs_events.rs index 987a7f62a..30c6d3aaa 100644 --- a/runtime/ops/fs_events.rs +++ b/runtime/ops/fs_events.rs @@ -101,7 +101,7 @@ fn op_fs_events_open( let (sender, receiver) = mpsc::channel::<Result<FsEvent, AnyError>>(16); let sender = Mutex::new(sender); let mut watcher: RecommendedWatcher = - Watcher::new_immediate(move |res: Result<NotifyEvent, NotifyError>| { + Watcher::new(move |res: Result<NotifyEvent, NotifyError>| { let res2 = res.map(FsEvent::from).map_err(AnyError::from); let sender = sender.lock(); // Ignore result, if send failed it means that watcher was already closed, @@ -114,11 +114,9 @@ fn op_fs_events_open( RecursiveMode::NonRecursive }; for path in &args.paths { - state - .borrow_mut::<Permissions>() - .read - .check(&PathBuf::from(path))?; - watcher.watch(path, recursive_mode)?; + let path = PathBuf::from(path); + state.borrow_mut::<Permissions>().read.check(&path)?; + watcher.watch(&path, recursive_mode)?; } let resource = FsEventsResource { watcher, |