Skip to content

Commit

Permalink
fix: remove permission check in op_require_node_module_paths (denolan…
Browse files Browse the repository at this point in the history
  • Loading branch information
dsherret authored Oct 30, 2024
1 parent a346071 commit a8846eb
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions ext/node/ops/require.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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") {
Expand Down

0 comments on commit a8846eb

Please sign in to comment.