From 51d20b6a8f695947a700e7fed8f0e5b33b79cefb Mon Sep 17 00:00:00 2001 From: Richard Lau Date: Tue, 12 Feb 2019 15:39:10 +0000 Subject: 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 Reviewed-By: Colin Ihrig Reviewed-By: Anna Henningsen Reviewed-By: Joyee Cheung Reviewed-By: James M Snell --- lib/internal/fs/utils.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/internal/fs/utils.js') 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]); } -- cgit v1.2.3