diff options
author | Anatoli Papirovski <apapirovski@mac.com> | 2018-09-12 20:47:56 -0700 |
---|---|---|
committer | Rich Trott <rtrott@gmail.com> | 2018-09-15 04:07:36 -0700 |
commit | 16210cad093519b756f2ce8025b29eb9f8d2d046 (patch) | |
tree | ef5372546254131a6c131c3b18ed5a45b16bf1cb /lib | |
parent | de37ba34c5d6f3a2d18daf482f850be8fddb4621 (diff) | |
download | node-new-16210cad093519b756f2ce8025b29eb9f8d2d046.tar.gz |
fs: fix promisified fs.readdir withFileTypes
PR-URL: https://github.com/nodejs/node/pull/22832
Reviewed-By: Bryan English <bryan@bryanenglish.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/internal/fs/promises.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/internal/fs/promises.js b/lib/internal/fs/promises.js index 0aa26ba2f9..6cae7d1a21 100644 --- a/lib/internal/fs/promises.js +++ b/lib/internal/fs/promises.js @@ -317,7 +317,8 @@ async function readdir(path, options) { path = toPathIfFileURL(path); validatePath(path); const result = await binding.readdir(pathModule.toNamespacedPath(path), - options.encoding, !!options.withTypes, + options.encoding, + !!options.withFileTypes, kUsePromises); return options.withFileTypes ? getDirectoryEntriesPromise(path, result) : |