GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||
GeezerVison is showing github.com — fs: stat src through symlinks in cpSync() when dereference is set by yohannesjoya · Pull Request #67340 · nodejs/node Conversation
Contributor
This swaps the two calls and drops the check that counted a symlink as a directory, which This is @npaun's fix from #60945, which the stale bot closed. I asked there on Oct 31 whether they planned to reopen it and got no reply, so I've rebased it and added the test, with them as co-author. Refs: #59168 AI disclosure: I used an AI assistant to help find, test and write up this change. I reviewed and tested it myself.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactionsCpSyncCheckPaths() used symlink_status() for src when dereference was true and status() when it was false, the reverse of what the option means. nodejs#59681 fixed the same swap for dest but left src as it was. A symlink to a file passed as src with dereference: true was treated as a directory, so cpSync() threw ERR_FS_EISDIR unless recursive was set, while fs.cp() copied the file. Swap the two calls and drop the check that counted a symlink as a directory, which status() can no longer return. Refs: nodejs#59168 Refs: nodejs#60945 Co-authored-by: Nicholas Paun <[email protected]> Signed-off-by: yohannesjoya <[email protected]>
Contributor
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
Contributor
Author
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
jasnell
approved these changes
Collaborator
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
LiviaMedeiros
approved these changes
Uh oh!
There was an error while loading. Please reload this page.
|
There was an error while loading. Please reload this page.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@ ## main #67340 +/- ## ========================================== - Coverage 92.99% 90.68% -2.32% ========================================== Files 428 797 +369 Lines 195633 279572 +83939 Branches 30281 53773 +23492 ========================================== + Hits 181937 253521 +71584 - Misses 13369 16342 +2973 - Partials 327 9709 +9382
🚀 New features to boost your workflow:
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Friendly ping: two approvals and green Jenkins CI (node-test-pull-request/79149). @LiviaMedeiros I left the |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Landed in 85eb0c7 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
CpSyncCheckPaths() used symlink_status() for src when dereference was true and status() when it was false, the reverse of what the option means. #59681 fixed the same swap for dest but left src as it was. A symlink to a file passed as src with dereference: true was treated as a directory, so cpSync() threw ERR_FS_EISDIR unless recursive was set, while fs.cp() copied the file. Swap the two calls and drop the check that counted a symlink as a directory, which status() can no longer return. Refs: #59168 Refs: #60945 Co-authored-by: Nicholas Paun <[email protected]> Signed-off-by: yohannesjoya <[email protected]> PR-URL: #67340 Reviewed-By: James M Snell <[email protected]> Reviewed-By: LiviaMedeiros <[email protected]>
CpSyncCheckPaths() used symlink_status() for src when dereference was true and status() when it was false, the reverse of what the option means. nodejs#59681 fixed the same swap for dest but left src as it was. A symlink to a file passed as src with dereference: true was treated as a directory, so cpSync() threw ERR_FS_EISDIR unless recursive was set, while fs.cp() copied the file. Swap the two calls and drop the check that counted a symlink as a directory, which status() can no longer return. Refs: nodejs#59168 Refs: nodejs#60945 Co-authored-by: Nicholas Paun <[email protected]> Signed-off-by: yohannesjoya <[email protected]> PR-URL: nodejs#67340 Reviewed-By: James M Snell <[email protected]> Reviewed-By: LiviaMedeiros <[email protected]>
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.