From a5f1307e45305cb7cf41e0e99cf1df74730cad6c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sa=C3=BAl=20Ibarra=20Corretg=C3=A9?= Date: Fri, 17 Oct 2014 09:31:23 +0200 Subject: [PATCH] core: replace uv_fs_readdir with uv_fs_scandir PR-URL: https://github.com/joyent/node/pull/8566 Reviewed-by: Fedor Indutny Reviewed-by: Trevor Norris --- src/node_file.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/node_file.cc b/src/node_file.cc index 8962f8680a..5a8d6ea467 100644 --- a/src/node_file.cc +++ b/src/node_file.cc @@ -205,7 +205,7 @@ static void After(uv_fs_t *req) { argv[1] = Integer::New(env->isolate(), req->result); break; - case UV_FS_READDIR: + case UV_FS_SCANDIR: { int r; Local names = Array::New(env->isolate(), 0); @@ -213,7 +213,7 @@ static void After(uv_fs_t *req) { for (int i = 0; ; i++) { uv_dirent_t ent; - r = uv_fs_readdir_next(req, &ent); + r = uv_fs_scandir_next(req, &ent); if (r == UV_EOF) break; if (r != 0) { @@ -710,9 +710,9 @@ static void ReadDir(const FunctionCallbackInfo& args) { node::Utf8Value path(args[0]); if (args[1]->IsFunction()) { - ASYNC_CALL(readdir, args[1], *path, 0 /*flags*/) + ASYNC_CALL(scandir, args[1], *path, 0 /*flags*/) } else { - SYNC_CALL(readdir, *path, *path, 0 /*flags*/) + SYNC_CALL(scandir, *path, *path, 0 /*flags*/) assert(SYNC_REQ.result >= 0); int r; @@ -721,7 +721,7 @@ static void ReadDir(const FunctionCallbackInfo& args) { for (int i = 0; ; i++) { uv_dirent_t ent; - r = uv_fs_readdir_next(&SYNC_REQ, &ent); + r = uv_fs_scandir_next(&SYNC_REQ, &ent); if (r == UV_EOF) break; if (r != 0)