summaryrefslogtreecommitdiff
path: root/lib/internal/fs/utils.js
diff options
context:
space:
mode:
authorRichard Lau <riclau@uk.ibm.com>2019-02-12 15:39:10 +0000
committerRichard Lau <riclau@uk.ibm.com>2019-02-15 01:55:58 -0500
commit51d20b6a8f695947a700e7fed8f0e5b33b79cefb (patch)
treef36e95adcfe96e9748686d4c19beffadd5bc9987 /lib/internal/fs/utils.js
parent8e68dc53b3526f46455c5b094cd8c08e87e22df1 (diff)
downloadandroid-node-v8-51d20b6a8f695947a700e7fed8f0e5b33b79cefb.tar.gz
android-node-v8-51d20b6a8f695947a700e7fed8f0e5b33b79cefb.tar.bz2
android-node-v8-51d20b6a8f695947a700e7fed8f0e5b33b79cefb.zip
fs, src, lib: fix `blksize` & `blocks` on Windows
libuv returns values for `blksize` and `blocks` on stat calls so do not coerce them into `undefined` on Windows. PR-URL: https://github.com/nodejs/node/pull/26056 Fixes: https://github.com/nodejs/node/issues/25913 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'lib/internal/fs/utils.js')
-rw-r--r--lib/internal/fs/utils.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/internal/fs/utils.js b/lib/internal/fs/utils.js
index 0062bd4355..fb36a173c3 100644
--- a/lib/internal/fs/utils.js
+++ b/lib/internal/fs/utils.js
@@ -315,9 +315,9 @@ Stats.prototype.isSocket = function() {
function getStatsFromBinding(stats, offset = 0) {
return new Stats(stats[0 + offset], stats[1 + offset], stats[2 + offset],
stats[3 + offset], stats[4 + offset], stats[5 + offset],
- isWindows ? undefined : stats[6 + offset], // blksize
+ stats[6 + offset], // blksize
stats[7 + offset], stats[8 + offset],
- isWindows ? undefined : stats[9 + offset], // blocks
+ stats[9 + offset], // blocks
stats[10 + offset], stats[11 + offset],
stats[12 + offset], stats[13 + offset]);
}