From ee2b6899a1e6a3108bad43443f130ca2dd86a697 Mon Sep 17 00:00:00 2001 From: Bedis Nbiba Date: Mon, 19 Aug 2024 18:45:10 +0100 Subject: fix: add permission name when accessing a special file errors (#25085) --- ext/fs/lib.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'ext/fs') diff --git a/ext/fs/lib.rs b/ext/fs/lib.rs index 2dce04b32..8eb6f2764 100644 --- a/ext/fs/lib.rs +++ b/ext/fs/lib.rs @@ -89,9 +89,9 @@ impl FsPermissions for deno_permissions::PermissionsContainer { api_name: &str, ) -> Result, FsError> { if resolved { - self.check_special_file(path, api_name).map_err(|_| { - std::io::Error::from(std::io::ErrorKind::PermissionDenied) - })?; + self + .check_special_file(path, api_name) + .map_err(FsError::PermissionDenied)?; return Ok(Cow::Borrowed(path)); } -- cgit v1.2.3