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)