diff options
author | Luca Bruno <lucab@lucabruno.net> | 2023-06-23 08:07:03 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-23 08:07:03 +0200 |
commit | 76f85a783e3ba4064027f581eb1fecf2ecba9de0 (patch) | |
tree | cc22faa46baa397a14a7530f4bcefd5da11a8a98 /ext | |
parent | dda0f1c343bfb3196ce6a7c7e8c2acccfd5c2e5b (diff) |
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
Diffstat (limited to 'ext')
-rw-r--r-- | ext/fs/30_fs.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/fs/30_fs.js b/ext/fs/30_fs.js index a149f653d..9c3bee6ac 100644 --- a/ext/fs/30_fs.js +++ b/ext/fs/30_fs.js @@ -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, |