diff options
author | Leo Kettmeir <crowlkats@toaxl.com> | 2024-11-04 09:17:21 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-04 09:17:21 -0800 |
commit | fe9f0ee5934871175758857899fe64e56c397fd5 (patch) | |
tree | ee770a45366d1b054e7429cea2eff56b04532830 /runtime/ops/fs_events.rs | |
parent | fb1d33a7111e45e9b414cfe922a5db5ee4daf3ea (diff) |
refactor(runtime/permissions): use concrete error types (#26464)
Diffstat (limited to 'runtime/ops/fs_events.rs')
-rw-r--r-- | runtime/ops/fs_events.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/runtime/ops/fs_events.rs b/runtime/ops/fs_events.rs index 648553376..c8e0228bc 100644 --- a/runtime/ops/fs_events.rs +++ b/runtime/ops/fs_events.rs @@ -114,7 +114,7 @@ pub enum FsEventsError { #[error(transparent)] Resource(deno_core::error::AnyError), #[error(transparent)] - Permission(deno_core::error::AnyError), + Permission(#[from] deno_permissions::PermissionCheckError), #[error(transparent)] Notify(#[from] NotifyError), #[error(transparent)] @@ -181,8 +181,7 @@ fn op_fs_events_open( for path in &paths { let path = state .borrow_mut::<PermissionsContainer>() - .check_read(path, "Deno.watchFs()") - .map_err(FsEventsError::Permission)?; + .check_read(path, "Deno.watchFs()")?; let watcher = state.borrow_mut::<WatcherState>(); watcher.watcher.watch(&path, recursive_mode)?; |