From 472a37064071c66cd1311cdea2e78de8d2bc0641 Mon Sep 17 00:00:00 2001 From: Matt Mastracci Date: Fri, 19 Apr 2024 18:12:03 -0600 Subject: feat(runtime): Allow embedders to perform additional access checks on file open (#23208) Embedders may have special requirements around file opening, so we add a new `check_open` permission check that is called as part of the file open process. --- ext/node/package_json.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ext/node/package_json.rs') diff --git a/ext/node/package_json.rs b/ext/node/package_json.rs index 77352ae1d..d4ffc80d6 100644 --- a/ext/node/package_json.rs +++ b/ext/node/package_json.rs @@ -82,7 +82,7 @@ impl PackageJson { return Ok(CACHE.with(|cache| cache.borrow()[&path].clone())); } - let source = match fs.read_text_file_sync(&path) { + let source = match fs.read_text_file_sync(&path, None) { Ok(source) => source, Err(err) if err.kind() == ErrorKind::NotFound => { return Ok(Rc::new(PackageJson::empty(path))); -- cgit v1.2.3