Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

unix: Set req->result to -1 on async uv_fs_readdir error

fixes test/simple/test-fs-error-messages.js in node.
  • Loading branch information...
ry committed Sep 5, 2011
1 parent be3b378 commit 991f6ee044cf28fe5672670ef5f214096eee2b5d
Showing with 2 additions and 0 deletions.
  1. +2 −0 src/unix/fs.c
@@ -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;
}

@@ -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;
}
}

0 comments on commit 991f6ee

Please sign in to comment.
You can’t perform that action at this time.