| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
Completely disables the use of positioned writes at writeFile and writeFileSync, which allows it to work with non-seekable files. Fixes: nodejs#31926
|
This variant is the one that does change behaviour in the custom-FD use case, right? I feel like 99.9 % of people wouldn’t be affected, but maybe we could still keep that for a separate PR? |
Sorry, something went wrong.
|
Nope, that behaviour change was already done in #23433 / #23709 (you voted for that option), i.e. the current code never does positioned writes on FDs: Lines 1289 to 1293 in 3d894d0 So this is a patch/minor change (unless I'm missing something) |
Sorry, something went wrong.
There was a problem hiding this comment.
Right, thanks for reminding me :)
Sorry, something went wrong.
Sorry, something went wrong.
|
No prob! It was more than a year ago, I'd have forgotten too 😹 |
Sorry, something went wrong.
|
CI: https://ci.nodejs.org/job/node-test-pull-request/29452/ (:white_check_mark:) |
Sorry, something went wrong.
Codecov Report
@@ Coverage Diff @@
## master #32006 +/- ##
=======================================
Coverage 96.16% 96.16%
=======================================
Files 196 196
Lines 64918 64918
=======================================
Hits 62429 62429
Misses 2489 2489Continue to review full report at Codecov.
|
Sorry, something went wrong.
|
This does not land cleanly on v13.x. Should it be backported? |
Sorry, something went wrong.
|
@MylesBorins Wrong label? And, yes, it should be backported. 👍 |
Sorry, something went wrong.
Completely disables the use of positioned writes at writeFile and writeFileSync, which allows it to work with non-seekable files. Fixes: nodejs#31926 PR-URL: nodejs#32006 Reviewed-By: Anna Henningsen <anna@addaleax.net>
| Back | FazBrowse Home | New Git URL |
Currently writeFile and writeFileSync perform a positioned write at the beginning of the file, which prevents them from working with non-seekable files (#31926).
Positioned writes were first removed for createWriteStream (#19329) and for custom FDs (#23433, #23709) as well as for files opened in append mode... but they're still used for filenames in normal mode. This PR removes positioned writes completely, as they're not needed for this case either.
This also makes it consistent with readFile (which does work with non-seekable files).
Checklist