Skip to content
This repository has been archived by the owner on May 4, 2018. It is now read-only.

Commit

Permalink
unix: Set req->result to -1 on async uv_fs_readdir error
Browse files Browse the repository at this point in the history
fixes test/simple/test-fs-error-messages.js in node.
  • Loading branch information
ry committed Sep 5, 2011
1 parent be3b378 commit 991f6ee
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/unix/fs.c
Expand Up @@ -305,6 +305,7 @@ int uv_fs_readdir(uv_loop_t* loop, uv_fs_t* req, const char* path, int flags,
DIR* dir = opendir(path);
if (!dir) {
uv_err_new(loop, errno);
req->result = -1;
return -1;
}

Expand Down Expand Up @@ -333,6 +334,7 @@ int uv_fs_readdir(uv_loop_t* loop, uv_fs_t* req, const char* path, int flags,
r = closedir(dir);
if (r) {
uv_err_new(loop, errno);
req->result = -1;
return -1;
}
}
Expand Down

0 comments on commit 991f6ee

Please sign in to comment.