Repository navigation
Conversation
49bc013 to
4c47117
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #60945 +/- ##
=======================================
Coverage 88.53% 88.53%
=======================================
Files 703 703
Lines 208406 208406
Branches 40198 40193 -5
=======================================
+ Hits 184502 184504 +2
- Misses 15901 15908 +7
+ Partials 8003 7994 -9
🚀 New features to boost your workflow:
|
| // In this test, both the cp and cpSync functions are attempting to copy | ||
| // a file over a symlinked directory. |
There was a problem hiding this comment.
Unlike the original test-fs-cp-sync-dereference.js, this one seems to test only the synchronous version.
|
This pull request has been marked as stale due to 90 days of inactivity. |
|
This pull request has been automatically closed after 30 days of inactivity following its stale status (no activity for a total of 120 days). |
|
Hi @npaun, this was closed by the stale bot, but the bug is still there on Do you plan to reopen this and finish it? If not, would you mind if I pick it up? I'd rebase it onto current |
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 <npaun@cloudflare.com> Signed-off-by: yohannesjoya <yohannesdestagebru10@gmail.com> PR-URL: #67340 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: LiviaMedeiros <livia@cirno.name>
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 <npaun@cloudflare.com> Signed-off-by: yohannesjoya <yohannesdestagebru10@gmail.com> PR-URL: #67340 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: LiviaMedeiros <livia@cirno.name>
Fixes #59168
As for the destination parameter symlink_status and status were accidentally swapped. symlink_status does NOT dereference while status does.