Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
lib: remove path.resolve from permissions.js
  • Loading branch information
RafaelGSS committed Jul 4, 2024
commit 1f2fe1ed90cf233f081665cc9f8d17060b9de80d
5 changes: 0 additions & 5 deletions lib/internal/process/permission.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,10 @@

const {
ObjectFreeze,
StringPrototypeStartsWith,
} = primordials;

const permission = internalBinding('permission');
const { validateString } = require('internal/validators');
const { resolve } = require('path');

let experimentalPermission;

Expand All @@ -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);
Expand Down