@@ -273,8 +273,8 @@ Binding.prototype.realpath = function (filepath, encoding, callback, ctx) {
273
273
} ) ;
274
274
} ;
275
275
276
- function fillStats ( stats ) {
277
- const target = stats instanceof Float64Array ? statValues : bigintStatValues ;
276
+ function fillStats ( stats , bigint ) {
277
+ const target = bigint ? bigintStatValues : statValues ;
278
278
for ( let i = 0 ; i < 36 ; i ++ ) {
279
279
target [ i ] = stats [ i ] ;
280
280
}
@@ -303,7 +303,7 @@ Binding.prototype.stat = function (filepath, bigint, callback, ctx) {
303
303
throw new FSError ( 'ENOENT' , filepath ) ;
304
304
}
305
305
const stats = item . getStats ( bigint ) ;
306
- fillStats ( stats ) ;
306
+ fillStats ( stats , bigint ) ;
307
307
return stats ;
308
308
} ) ;
309
309
} ;
@@ -323,7 +323,7 @@ Binding.prototype.fstat = function (fd, bigint, callback, ctx) {
323
323
const descriptor = this . getDescriptorById ( fd ) ;
324
324
const item = descriptor . getItem ( ) ;
325
325
const stats = item . getStats ( bigint ) ;
326
- fillStats ( stats ) ;
326
+ fillStats ( stats , bigint ) ;
327
327
return stats ;
328
328
} ) ;
329
329
} ;
@@ -1252,7 +1252,7 @@ Binding.prototype.lstat = function (filepath, bigint, callback, ctx) {
1252
1252
throw new FSError ( 'ENOENT' , filepath ) ;
1253
1253
}
1254
1254
const stats = item . getStats ( bigint ) ;
1255
- fillStats ( stats ) ;
1255
+ fillStats ( stats , bigint ) ;
1256
1256
return stats ;
1257
1257
} ) ;
1258
1258
} ;
0 commit comments