Commit b6207906 authored by Evan Lucas's avatar Evan Lucas
Browse files

fs: pass err to callback if buffer is too big

In fs.readFile, if an encoding is specified and toString fails, do not
throw an error. Instead, pass the error to the callback.

Fixes: https://github.com/nodejs/node/issues/2767
PR-URL: https://github.com/nodejs/node/pull/3485


Reviewed-By: default avatarJames M Snell <jasnell@gmail.com>
Reviewed-By: default avatarTrevor Norris <trev.norris@gmail.com>
parent 594500f9
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment