diff --git a/src/unix/fs.c b/src/unix/fs.c index cab41064..554ef903 100644 --- a/src/unix/fs.c +++ b/src/unix/fs.c @@ -116,6 +116,9 @@ static int uv__fs_after(eio_req* eio) { switch (req->fs_type) { case UV_FS_READDIR: + if (req->eio->result == -1) + break; /* opendir() or readdir() operation failed. */ + /* * XXX This is pretty bad. * We alloc and copy the large null terminated string list from libeio.