diff options
author | Jonathan Knezek <jdknezek@gmail.com> | 2010-05-06 00:23:45 -0500 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2010-05-05 22:34:36 -0700 |
commit | 82c8973dfa5dc39a6164a6fdad4c20661d0b1215 (patch) | |
tree | 036dcd4f71bacf6b130f23422ba84cf0b0486332 | |
parent | 874b80bd6afa17ae5da0ec5b485a20c61cf7d875 (diff) | |
download | nodejs-82c8973dfa5dc39a6164a6fdad4c20661d0b1215.tar.gz nodejs-82c8973dfa5dc39a6164a6fdad4c20661d0b1215.tar.bz2 nodejs-82c8973dfa5dc39a6164a6fdad4c20661d0b1215.zip |
Changed undefined pos to null to prevent hanging on SheevaPlug
-rw-r--r-- | lib/fs.js | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -63,8 +63,8 @@ fs.readFile = function (path, encoding_, callback) { if (err) { if (callback) callback(err); } else { - // leave pos undefined to allow reads on unseekable devices - readAll(fd, undefined, "", encoding, callback); + // leave pos null to allow reads on unseekable devices + readAll(fd, null, "", encoding, callback); } }); }; @@ -74,7 +74,7 @@ fs.readFileSync = function (path, encoding) { var fd = binding.open(path, process.O_RDONLY, 0666); var content = ''; - var pos; // leave undefined to allow reads on unseekable devices + var pos = null; // leave null to allow reads on unseekable devices var r; while ((r = binding.read(fd, 4*1024, pos, encoding)) && r[0]) { |