diff options
author | Richard Lau <riclau@uk.ibm.com> | 2019-02-12 15:39:10 +0000 |
---|---|---|
committer | Richard Lau <riclau@uk.ibm.com> | 2019-02-15 01:55:58 -0500 |
commit | 51d20b6a8f695947a700e7fed8f0e5b33b79cefb (patch) | |
tree | f36e95adcfe96e9748686d4c19beffadd5bc9987 /src | |
parent | 8e68dc53b3526f46455c5b094cd8c08e87e22df1 (diff) | |
download | android-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 'src')
-rw-r--r-- | src/node_file.h | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/src/node_file.h b/src/node_file.h index 5ae01df9ef..034e3c0427 100644 --- a/src/node_file.h +++ b/src/node_file.h @@ -199,18 +199,10 @@ constexpr void FillStatsArray(AliasedBuffer<NativeT, V8T>* fields, fields->SetValue(offset + 3, s->st_uid); fields->SetValue(offset + 4, s->st_gid); fields->SetValue(offset + 5, s->st_rdev); -#if defined(__POSIX__) fields->SetValue(offset + 6, s->st_blksize); -#else - fields->SetValue(offset + 6, 0); -#endif fields->SetValue(offset + 7, s->st_ino); fields->SetValue(offset + 8, s->st_size); -#if defined(__POSIX__) fields->SetValue(offset + 9, s->st_blocks); -#else - fields->SetValue(offset + 9, 0); -#endif // Dates. fields->SetValue(offset + 10, ToNative<NativeT>(s->st_atim)); fields->SetValue(offset + 11, ToNative<NativeT>(s->st_mtim)); |