mirror of
https://github.com/denoland/std.git
synced 2024-11-22 04:59:05 +00:00
fix(wasi): remove number overload from rights in path_open (denoland/deno#6768)
This commit is contained in:
parent
1425960509
commit
1c8cbe289a
@ -1170,8 +1170,8 @@ export default class Module {
|
||||
path_ptr: number,
|
||||
path_len: number,
|
||||
oflags: number,
|
||||
fs_rights_base: number | bigint,
|
||||
fs_rights_inherting: number | bigint,
|
||||
fs_rights_base: bigint,
|
||||
fs_rights_inherting: bigint,
|
||||
fdflags: number,
|
||||
opened_fd_out: number,
|
||||
): number => {
|
||||
@ -1232,24 +1232,23 @@ export default class Module {
|
||||
options.write = true;
|
||||
}
|
||||
|
||||
if (
|
||||
(BigInt(fs_rights_base) &
|
||||
BigInt(RIGHTS_FD_READ | RIGHTS_FD_READDIR)) !=
|
||||
0n
|
||||
) {
|
||||
const read = (
|
||||
RIGHTS_FD_READ |
|
||||
RIGHTS_FD_READDIR
|
||||
);
|
||||
|
||||
if ((fs_rights_base & read) != 0n) {
|
||||
options.read = true;
|
||||
}
|
||||
|
||||
if (
|
||||
(BigInt(fs_rights_base) &
|
||||
BigInt(
|
||||
RIGHTS_FD_DATASYNC |
|
||||
RIGHTS_FD_WRITE |
|
||||
RIGHTS_FD_ALLOCATE |
|
||||
RIGHTS_FD_FILESTAT_SET_SIZE,
|
||||
)) !=
|
||||
0n
|
||||
) {
|
||||
const write = (
|
||||
RIGHTS_FD_DATASYNC |
|
||||
RIGHTS_FD_WRITE |
|
||||
RIGHTS_FD_ALLOCATE |
|
||||
RIGHTS_FD_FILESTAT_SET_SIZE
|
||||
);
|
||||
|
||||
if ((fs_rights_base & write) != 0n) {
|
||||
options.write = true;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user