-
Notifications
You must be signed in to change notification settings - Fork 31.1k
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
Reading a file name with null bytes fails, but has no err.code #517
Comments
Any suggestions on a |
the code should be ENOENT, for consistency with other situations where the pathname is invalid. |
@piscisaureus updated to |
cjihrig
added a commit
that referenced
this issue
Jan 19, 2015
This commit adds a code field to the error returned by nullCheck(). Fixes: #517 PR-URL: #519 Reviewed-By: Ben Noordhuis <[email protected]>
Landed in 03ee4d8 |
Sweet, thanks! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
As reported in jsdom/jsdom#1003, if you do
fs.readFile("<div>\0</div>", "utf-8", function (err) { })
thenerr
will only be detectable viaerr.toString() == 'Error: Path must be a string without null bytes.'
. Having a.code
would be better.The text was updated successfully, but these errors were encountered: