``` fs.read(fd, buf, 0, buf.length, stat.size-buf.length-i, function(err, bytesRead, buffer) { if(err) {console.log(err);throw err;} buffer.copy(lastlinebuffer,position, 0,1); position++; if(position>100000)console.log("文件最后行太长超出缓存区"); if (buffer[0] === 0x0a) { //0x0a == '\n' { [Error: EINVAL, read] errno: -4071, code: 'EINVAL' } Error: EINVAL, read at Error (native) ```
Activity
mscdex commentedon Dec 28, 2015
What are the values being passed to
fs.read()when the error occurs?cjihrig commentedon Jan 15, 2016
No follow up. Closing. We can reopen if necessary.