FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

fs, src, lib: fix `blksize` & `blocks` on Windows by richardlau · Pull Request #26056 · nodejs/node · GitHub

/ node Public

fs, src, lib: fix blksize & blocks on Windows - #26056

Merged
richardlau merged 1 commit into
nodejs:masterfrom
richardlau:winfsstatblks
Feb 15, 2019
Merged

fs, src, lib: fix blksize & blocks on Windows#26056
richardlau merged 1 commit into
nodejs:masterfrom
richardlau:winfsstatblks

Conversation

richardlau commented Feb 12, 2019
edited
Loading

Copy link
Copy Markdown
Member

libuv returns values for blksize and blocks on stat calls so
do not coerce them into undefined on Windows.

Fixes: #25913

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines

Copy link
Copy Markdown
Collaborator

nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. fs Issues and PRs related to the fs subsystem / file system. labels Feb 12, 2019

Copy link
Copy Markdown
Member Author

richardlau added the author ready PRs that have at least one approval, no outstanding review comments, and a CI started. label Feb 12, 2019

Copy link
Copy Markdown
Member Author

FreeBSD failure is infrastructure: nodejs/build#1682

Copy link
Copy Markdown
Member

Looks like the previous behavior was to return undefined in fs.watchFile call stat objects on Windows when there was an error so that users can check for errors
ed85c95

Copy link
Copy Markdown
Member Author

Looks like the previous behavior was to return undefined in fs.watchFile call stat objects on Windows when there was an error so that users can check for errors
ed85c95

I see no reason for Windows to differ from the other platforms with regard to 0 vs undefined. I've pushed an update to the documentation (thank you, I hadn't spotted it).

Copy link
Copy Markdown
Member Author

richardlau commented Feb 13, 2019
edited
Loading

Copy link
Copy Markdown
Member Author

joyeecheung left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

LGTM. If this has been broken for so long without being noticed, it's probably to leave this as a semver-patch.

libuv returns values for `blksize` and `blocks` on stat calls so
do not coerce them into `undefined` on Windows.

PR-URL: nodejs#26056
Fixes: nodejs#25913
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
richardlau merged commit 51d20b6 into nodejs:master Feb 15, 2019
targos pushed a commit that referenced this pull request Feb 15, 2019
libuv returns values for `blksize` and `blocks` on stat calls so
do not coerce them into `undefined` on Windows.

PR-URL: #26056
Fixes: #25913
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
BridgeAR mentioned this pull request Feb 26, 2019
rvagg pushed a commit that referenced this pull request Feb 28, 2019
libuv returns values for `blksize` and `blocks` on stat calls so
do not coerce them into `undefined` on Windows.

PR-URL: #26056
Fixes: #25913
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author ready PRs that have at least one approval, no outstanding review comments, and a CI started. c++ Issues and PRs that require attention from people who are familiar with C++. fs Issues and PRs related to the fs subsystem / file system.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

on Win10, fs.stat() returns a stats with undefined blksize and blocks

7 participants


Back | FazBrowse Home | New Git URL