Skip to content

Conversation

@jwhear
Copy link
Contributor

@jwhear jwhear commented Feb 16, 2023

Resolves #1516

FileSystemFlags.fromJS was hardcoded to return O_RDONLY when the flag value
was null or undefined and this caused breakage when used with write functions.
Updated the function to take a default argument so that the caller can specify
a sane default for their use.

In all usages the caller had already assigned the correct default to target variable, so the usages were easily patched.

`FileSystemFlags.fromJS` was hardcoded to return O_RDONLY when the flag value
 was null or undefined and this caused breakage when used with write functions.
Updated the function to take a `default` argument so that the caller can specify
 a sane default for their use.
@Jarred-Sumner Jarred-Sumner merged commit 7762f3f into oven-sh:main Feb 16, 2023
@Jarred-Sumner
Copy link
Collaborator

Thank you

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.

writeFileSync(path, data, { flag: undefined }) throws an error

2 participants