diff --git a/src/node_file.cc b/src/node_file.cc index 89a786b17e..59ff414c69 100644 --- a/src/node_file.cc +++ b/src/node_file.cc @@ -321,15 +321,25 @@ Local BuildStatsObject(const uv_statbuf_t* s) { stats->Set(name##_symbol, val); \ } X(dev) - X(ino) X(mode) X(nlink) X(uid) X(gid) X(rdev) - X(size) # if defined(__POSIX__) X(blksize) +# endif +#undef X + +#define X(name) \ + { \ + Local val = Number::New(static_cast(s->st_##name)); \ + if (val.IsEmpty()) return Local(); \ + stats->Set(name##_symbol, val); \ + } + X(ino) + X(size) +# if defined(__POSIX__) X(blocks) # endif #undef X