Skip to content

fix: fix isRead check on file descriptor - #289

Merged
tschaub merged 2 commits into
masterfrom
fix-file-isRead
Apr 21, 2020
Merged

tschaub merged 2 commits into
masterfrom
fix-file-isRead

Conversation

@3cp

@3cp 3cp commented Jan 5, 2020

Copy link
Copy Markdown
Collaborator

The argument flags must include one of the following access modes:
O_RDONLY, O_WRONLY, or O_RDWR. These request opening the file read-
only, write-only, or read/write, respectively.
O_RDONLY is 0, O_WRONLY is 1, O_RDWR is 2, the flags use 2 bits for 3 states: 0 (0b00) / 1 (0b01) / 2 (0b10), the 2 bits will never be 3 (0b11).

closes #288

Comment thread test/lib/descriptor.spec.js Resolved
@tschaub

tschaub commented Apr 20, 2020

Copy link
Copy Markdown
Owner

Thanks, @3cp. Apologies for the delay (and the need to rebase to get #296).

3cp added 2 commits April 21, 2020 08:15
The argument flags must include one of the following access modes:
O_RDONLY, O_WRONLY, or O_RDWR.  These request opening the file read-
only, write-only, or read/write, respectively.
O_RDONLY is 0, O_WRONLY is 1, O_RDWR is 2, the flags use 2 bits for 3 states: 0 (0b00) / 1 (0b01) / 2 (0b10), the 2 bits will never be 3 (0b11).

closes #288
@3cp
3cp force-pushed the fix-file-isRead branch from ceb5e52 to ede39f4 Compare April 20, 2020 22:16
@3cp

3cp commented Apr 20, 2020

Copy link
Copy Markdown
Collaborator Author

Passed checks.

@tschaub
tschaub merged commit c40c2e1 into master Apr 21, 2020
@tschaub
tschaub deleted the fix-file-isRead branch April 21, 2020 00:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

EBADF from fs.promises.readFile() and O_CREAT

2 participants