-
Notifications
You must be signed in to change notification settings - Fork 154
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
Support fs.open() flags being a number vs. string #747
Comments
Hey @tinchoz49, this is a bug, thanks for filing. We currently assume flags are in string form ( Fixing this would involve making our code do what node does:
A simple fix would be to alter our |
@rscotchmer not sure what you're looking to do for your 0.3 bugs, but this one might be interesting to you. I could mentor you through it, if you have interest. No pressure if you have other things you want to try next. |
@humphd I'd love to work on this! Thanks for notifying me! |
@rscotchmer great, here are some more thoughts. We currently use strings for flags, and we should switch to using numbers. If a string is passed to us, we should convert it into a number. See the code I linked to above from node, which does what we want. Next, we do a bunch of checks all over like this: https://github.com/filerjs/filer/blob/master/src/filesystem/implementation.js#L622. Instead of doing this, we'd want to convert that to use the We could start by converting the code in the first comment above into a test we add to the Let me know what questions you have, or further help I can give. I'm happy to guide you as you deem necessary. |
Hey everyone, thanks to start working on this! |
Hi everyone!
I'm trying to do this and I'm getting flags is not valid:
The text was updated successfully, but these errors were encountered: