Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fix isRead check on file descriptor #289

Merged
merged 2 commits into from
Apr 21, 2020
Merged

fix: fix isRead check on file descriptor #289

merged 2 commits into from
Apr 21, 2020

Conversation

3cp
Copy link
Collaborator

@3cp 3cp commented Jan 5, 2020

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

@tschaub
Copy link
Owner

tschaub commented Apr 20, 2020

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
Copy link
Collaborator Author

3cp commented Apr 20, 2020

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