-
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.stat and fs.statSync may not return identical struct #12419
Comments
Interestingly, |
@bnoordhuis i didn't go as far as looking into libuv code, but at least i didn't spot anything in node code itself... Sadly i don't have possibility to test it on any unix like system, so cannot say if it is windows specific bug or not. |
Looking into it with |
@DoumanAsh Did you try with previous v7.x versions and/or other major versions? |
@mscdex I remember having this issue in past on some older 7.x version, but cannot say for sure right now. UPD: |
How did you create the file? |
Just |
The issue is that some optimizations were made to the So either #11665 has to be backported, or only the |
This is fixed in 8.x and the only affected currently-supported release line is 6.x? [EDIT: To be clear, that's a question, not a statement.] |
@Trott yes, but I'm leaning towards just counting both PRs as semver-major (currently one is and the other isn't), which would mean no backporting at all. As far as the changes themselves go, changing the values in v6.x would be viewed as semver-major anyway, in case someone is relying on the signed-ness of the value. |
@mscdex - this looks like a close candidate with no pending actions, right? |
inactive, closing. please re-open if it is still outstanding. |
Simple code example is here: https://gist.github.com/DoumanAsh/a70b49b3e05aa4c4273dd6917cce13e0
Occasionally found that Stats.dev differs for sync and async versions.
I'm not really sure how it is possible considering that both should use the same OS API...
All other fields are identical
Sync stats output:
Async stat output
The text was updated successfully, but these errors were encountered: