diff options
author | 2023-07-28 17:53:12 -0700 | |
---|---|---|
committer | 2023-07-28 17:53:12 -0700 | |
commit | bd66a9a94c89c53d325ee730346a5d4ed53d88ca (patch) | |
tree | 3e00128d06dc1eb1cbd6fec9894d30f47202d7c9 | |
parent | 1490cdc4ffd587ce3c0d5091ab2a8851f2a3b419 (diff) | |
download | bun-bd66a9a94c89c53d325ee730346a5d4ed53d88ca.tar.gz bun-bd66a9a94c89c53d325ee730346a5d4ed53d88ca.tar.zst bun-bd66a9a94c89c53d325ee730346a5d4ed53d88ca.zip |
Fixes #3868
Fixes #3868
Fixes #849
-rw-r--r-- | src/bun.js/node/types.zig | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/bun.js/node/types.zig b/src/bun.js/node/types.zig index e472f370f..6162bf9e4 100644 --- a/src/bun.js/node/types.zig +++ b/src/bun.js/node/types.zig @@ -1279,7 +1279,8 @@ fn StatsDataType(comptime T: type) type { uid: T, gid: T, rdev: T, - size: T, + // Always store size as a 64-bit integer + size: i64, blksize: T, blocks: T, atime_ms: f64, @@ -1306,7 +1307,7 @@ fn StatsDataType(comptime T: type) type { .uid = @as(T, @truncate(@as(i64, @intCast(stat_.uid)))), .gid = @as(T, @truncate(@as(i64, @intCast(stat_.gid)))), .rdev = @as(T, @truncate(@as(i64, @intCast(stat_.rdev)))), - .size = @as(T, @truncate(@as(i64, @intCast(stat_.size)))), + .size = @truncate(@as(i64, @intCast(stat_.size))), .blksize = @as(T, @truncate(@as(i64, @intCast(stat_.blksize)))), .blocks = @as(T, @truncate(@as(i64, @intCast(stat_.blocks)))), .atime_ms = (@as(f64, @floatFromInt(@max(atime.tv_sec, 0))) * std.time.ms_per_s) + (@as(f64, @floatFromInt(@as(usize, @intCast(@max(atime.tv_nsec, 0))))) / std.time.ns_per_ms), |