-
-
Save indutny/3ee22d75e3f92eba3e92 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/deps/uv/src/unix/fs.c b/deps/uv/src/unix/fs.c | |
index 2dd0fe9..fc7413f 100644 | |
--- a/deps/uv/src/unix/fs.c | |
+++ b/deps/uv/src/unix/fs.c | |
@@ -311,6 +311,7 @@ static ssize_t uv__fs_readdir(uv_fs_t* req) { | |
dents = NULL; | |
n = scandir(req->path, &dents, uv__fs_readdir_filter, alphasort); | |
+ req->nbufs = 0; | |
if (n == 0) | |
goto out; /* osx still needs to deallocate some memory */ | |
@@ -319,7 +320,6 @@ static ssize_t uv__fs_readdir(uv_fs_t* req) { | |
/* NOTE: We will use nbufs as an index field */ | |
req->ptr = dents; | |
- req->nbufs = 0; | |
return n; | |
diff --git a/src/node_file.cc b/src/node_file.cc | |
index 8962f86..244111b 100644 | |
--- a/src/node_file.cc | |
+++ b/src/node_file.cc | |
@@ -213,6 +213,7 @@ static void After(uv_fs_t *req) { | |
for (int i = 0; ; i++) { | |
uv_dirent_t ent; | |
+ fprintf(stdout, "readdir %p %d\n", req->ptr, req->nbufs); | |
r = uv_fs_readdir_next(req, &ent); | |
if (r == UV_EOF) | |
break; |
tjfontaine
commented
Sep 23, 2014
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment