diff options
author | David Sherret <dsherret@users.noreply.github.com> | 2024-10-30 16:43:22 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-30 20:43:22 +0000 |
commit | a8846eb70f96445753fe5f8f56e6155cb2d0fac6 (patch) | |
tree | 5d361f4fabcb8717c2fcdf08cb52bb5e63354d4a /ext/node | |
parent | a346071dd2bd822a7c2abcb187406efe7d1d1471 (diff) |
fix: remove permission check in op_require_node_module_paths (#26645)
Diffstat (limited to 'ext/node')
-rw-r--r-- | ext/node/ops/require.rs | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/ext/node/ops/require.rs b/ext/node/ops/require.rs index f4607f4e8..43867053b 100644 --- a/ext/node/ops/require.rs +++ b/ext/node/ops/require.rs @@ -131,9 +131,6 @@ where normalize_path(current_dir.join(from)) }; - let from = ensure_read_permission::<P>(state, &from) - .map_err(RequireError::Permission)?; - if cfg!(windows) { // return root node_modules when path is 'D:\\'. let from_str = from.to_str().unwrap(); @@ -154,7 +151,7 @@ where } let mut paths = Vec::with_capacity(from.components().count()); - let mut current_path = from.as_ref(); + let mut current_path = from.as_path(); let mut maybe_parent = Some(current_path); while let Some(parent) = maybe_parent { if !parent.ends_with("node_modules") { |