1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-01-21 04:52:26 -05:00

fix(ext/fs): do not throw for bigint ctime/mtime/atime (#27453)

This commit is contained in:
Yoshiya Hinosawa 2024-12-23 13:56:37 +09:00 committed by GitHub
parent e6869d7fa6
commit 2e58e088b0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -77,6 +77,7 @@ const {
Error, Error,
Function, Function,
MathTrunc, MathTrunc,
Number,
ObjectEntries, ObjectEntries,
ObjectDefineProperty, ObjectDefineProperty,
ObjectPrototypeIsPrototypeOf, ObjectPrototypeIsPrototypeOf,
@ -373,12 +374,12 @@ function parseFileInfo(response) {
isDirectory: response.isDirectory, isDirectory: response.isDirectory,
isSymlink: response.isSymlink, isSymlink: response.isSymlink,
size: response.size, size: response.size,
mtime: response.mtimeSet === true ? new Date(response.mtime) : null, mtime: response.mtimeSet === true ? new Date(Number(response.mtime)) : null,
atime: response.atimeSet === true ? new Date(response.atime) : null, atime: response.atimeSet === true ? new Date(Number(response.atime)) : null,
birthtime: response.birthtimeSet === true birthtime: response.birthtimeSet === true
? new Date(response.birthtime) ? new Date(response.birthtime)
: null, : null,
ctime: response.ctimeSet === true ? new Date(response.ctime) : null, ctime: response.ctimeSet === true ? new Date(Number(response.ctime)) : null,
dev: response.dev, dev: response.dev,
mode: response.mode, mode: response.mode,
ino: unix ? response.ino : null, ino: unix ? response.ino : null,