Skip to content

Commit

Permalink
fixup! lib,permission: support Buffer to permission.has
Browse files Browse the repository at this point in the history
  • Loading branch information
RafaelGSS committed Jul 31, 2024
1 parent b8fad8b commit c95589f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion test/fixtures/permission/fs-traversal.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,9 @@ const uint8ArrayTraversalPath = new TextEncoder().encode(traversalPath);
fs.lstat(bufferTraversalPath, common.expectsError({
code: 'ERR_ACCESS_DENIED',
permission: 'FileSystemRead',
resource: path.toNamespacedPath(traversalPath),
// lstat checks and throw on JS side.
// resource is only resolved on C++ (is_granted)
resource: Buffer.toString(bufferTraversalPath),
}));
}

Expand Down

0 comments on commit c95589f

Please sign in to comment.