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

fs.write doesn't coerce data value to a string #1098

Closed
xibre opened this issue Mar 8, 2015 · 1 comment
Closed

fs.write doesn't coerce data value to a string #1098

xibre opened this issue Mar 8, 2015 · 1 comment
Labels
fs Issues and PRs related to the fs subsystem / file system.

Comments

@xibre
Copy link

xibre commented Mar 8, 2015

Hi. Today I tried to run something similar to this:

var data = true;
fs.write(fd, data, cb);

data value must be coerced to string as mentioned in API.
But that failed with message:

Assertion failed: val->IsString() == true, file src\string_bytes.cc, line 286

fs.writeSync, however worked well.

Then I found this:
https://github.com/iReal/io.js/blob/v1.x/lib/fs.js#L632-L633

There should be !==, not ===.

@vkurchatkin vkurchatkin added the fs Issues and PRs related to the fs subsystem / file system. label Mar 8, 2015
Fishrock123 added a commit to Fishrock123/node that referenced this issue Mar 8, 2015
Fishrock123 added a commit that referenced this issue Mar 8, 2015
@brendanashworth
Copy link
Contributor

@iReal thanks to @Fishrock123 this should now be fixed on HEAD. If this issue comes back up, please reopen the issue. Thanks for reporting this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fs Issues and PRs related to the fs subsystem / file system.
Projects
None yet
Development

No branches or pull requests

3 participants