summaryrefslogtreecommitdiff
path: root/ext/fs
diff options
context:
space:
mode:
authorBedis Nbiba <bedisnbiba@gmail.com>2024-08-19 18:45:10 +0100
committerGitHub <noreply@github.com>2024-08-19 17:45:10 +0000
commitee2b6899a1e6a3108bad43443f130ca2dd86a697 (patch)
treede2d5ef8e1642f52b28fd6fdcedcb314b4aa3dd8 /ext/fs
parent0f2e47dd69e432b6c798e2ecc24fddb73d0d6f0e (diff)
fix: add permission name when accessing a special file errors (#25085)
Diffstat (limited to 'ext/fs')
-rw-r--r--ext/fs/lib.rs6
1 files changed, 3 insertions, 3 deletions
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<Cow<'a, Path>, 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));
}