-
Notifications
You must be signed in to change notification settings - Fork 29.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fs.utimes Infinity support is misdocumented or regressed #15453
Comments
The note in the documentation was added in eed87b1. Would you care to send a documentation PR to update the |
mscdex
added
fs
Issues and PRs related to the fs subsystem / file system.
doc
Issues and PRs related to the documentations.
labels
Sep 18, 2017
lpinca
added a commit
to lpinca/node
that referenced
this issue
Sep 29, 2017
Specify that `NaN`, `Infinity`, and `-Infinity` are no longer valid values for the `atime` and `mtime` arguments. Fixes: nodejs#15453
2 tasks
addaleax
pushed a commit
to addaleax/ayo
that referenced
this issue
Oct 4, 2017
Specify that `NaN`, `Infinity`, and `-Infinity` are no longer valid values for the `atime` and `mtime` arguments. PR-URL: nodejs/node#15680 Fixes: nodejs/node#15453 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Potentially related to #14017.
Take this code:
(I needed to set the mtime to some point in the past for
make
’s sake so it wouldn’t consider a broken file to be up to date and would try again. Not sure quite why I wroteInfinity
for the atime rather thanDate.now() / 1000
, though I believe they were equivalent.)The
fs.utimes
documentation is inconsistent on how infinities should be handled:In its history, it says that in v4.1.0, “Numeric strings,
NaN
andInfinity
are now allowed time specifiers.” There is no note saying thatNaN
andInfinity
are no longer permitted from such-and-such a version, yet the function documentation says “If the value isNaN
,Infinity
or-Infinity
, an Error will be thrown.”Either the history should be updated to indicate when infinties became illegal again, or this is a regression.
This worked on some Node 4 version, but it’s not working on 8.5.0 (I just upgraded).
The text was updated successfully, but these errors were encountered: