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

fix(ext/fs): fix boolean checks in JS parser (#19586)

This fixes a bug in file metadata parsing logic, which now properly
evaluates boolean fields when forwarding for atime / mtime / birthtime
values.

Ref: https://github.com/denoland/deploy_feedback/issues/409
This commit is contained in:
Luca Bruno 2023-06-23 08:07:03 +02:00 committed by GitHub
parent dda0f1c343
commit 76f85a783e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -316,9 +316,9 @@ function parseFileInfo(response) {
isDirectory: response.isDirectory,
isSymlink: response.isSymlink,
size: response.size,
mtime: response.mtimeSet !== null ? new Date(response.mtime) : null,
atime: response.atimeSet !== null ? new Date(response.atime) : null,
birthtime: response.birthtimeSet !== null
mtime: response.mtimeSet === true ? new Date(response.mtime) : null,
atime: response.atimeSet === true ? new Date(response.atime) : null,
birthtime: response.birthtimeSet === true
? new Date(response.birthtime)
: null,
dev: response.dev,