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.read error #4443

Closed
gentlecolder opened this issue Dec 28, 2015 · 2 comments
Closed

fs.read error #4443

gentlecolder opened this issue Dec 28, 2015 · 2 comments
Labels
fs Issues and PRs related to the fs subsystem / file system.

Comments

@gentlecolder
Copy link

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)
@mscdex mscdex added the fs Issues and PRs related to the fs subsystem / file system. label Dec 28, 2015
@mscdex
Copy link
Contributor

mscdex commented Dec 28, 2015

What are the values being passed to fs.read() when the error occurs?

@cjihrig
Copy link
Contributor

cjihrig commented Jan 15, 2016

No follow up. Closing. We can reopen if necessary.

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