From afe7f4f819f7846fadb3ddd881a73a6c42c38c55 Mon Sep 17 00:00:00 2001 From: Rafael Gonzaga Date: Mon, 8 Jul 2024 09:01:38 -0300 Subject: [PATCH] lib: remove path.resolve from permissions.js PR-URL: https://github.com/nodejs/node/pull/53729 Reviewed-By: Yagiz Nizipli Reviewed-By: Marco Ippolito Reviewed-By: Minwoo Jung Reviewed-By: James M Snell Reviewed-By: Benjamin Gruenbaum --- lib/internal/process/permission.js | 5 ----- 1 file changed, 5 deletions(-) diff --git a/lib/internal/process/permission.js b/lib/internal/process/permission.js index f17bfade519bfb..f0d5f2b180b8fa 100644 --- a/lib/internal/process/permission.js +++ b/lib/internal/process/permission.js @@ -2,12 +2,10 @@ const { ObjectFreeze, - StringPrototypeStartsWith, } = primordials; const permission = internalBinding('permission'); const { validateString } = require('internal/validators'); -const { resolve } = require('path'); let experimentalPermission; @@ -25,9 +23,6 @@ module.exports = ObjectFreeze({ if (reference != null) { // TODO: add support for WHATWG URLs and Uint8Arrays. validateString(reference, 'reference'); - if (StringPrototypeStartsWith(scope, 'fs')) { - reference = resolve(reference); - } } return permission.has(scope, reference);