Skip to content

fs: fix incorrect dereferencing of src arg in cpSync - #60945

Open
npaun wants to merge 1 commit into
nodejs:mainfrom
npaun:npaun/fix-cpsync-dereference-true
Open

fs: fix incorrect dereferencing of src arg in cpSync#60945
npaun wants to merge 1 commit into
nodejs:mainfrom
npaun:npaun/fix-cpsync-dereference-true

Conversation

@npaun

@npaun npaun commented Dec 3, 2025

Copy link
Copy Markdown
Contributor

Fixes #59168
As for the destination parameter symlink_status and status were accidentally swapped. symlink_status does NOT dereference while status does.

@nodejs-github-bot 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. needs-ci PRs that need a full CI run. labels Dec 3, 2025
@anonrig anonrig added the request-ci Add this label to start a Jenkins CI on a PR. label Dec 3, 2025
@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Dec 3, 2025
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@npaun
npaun force-pushed the npaun/fix-cpsync-dereference-true branch from 49bc013 to 4c47117 Compare December 3, 2025 20:37
@codecov

codecov Bot commented Dec 3, 2025

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.53%. Comparing base (746c3c2) to head (4c47117).
⚠️ Report is 1940 commits behind head on main.

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     
Files with missing lines Coverage Δ
src/node_file.cc 75.47% <100.00%> (-0.08%) ⬇️

... and 28 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Comment on lines +5 to +6
// In this test, both the cp and cpSync functions are attempting to copy
// a file over a symlinked directory.

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.

Unlike the original test-fs-cp-sync-dereference.js, this one seems to test only the synchronous version.

@github-actions

Copy link
Copy Markdown
Contributor

This pull request has been marked as stale due to 90 days of inactivity.
It will be automatically closed in 30 days if no further activity occurs. If this is still relevant, please leave a comment or update it to keep it open.

@github-actions github-actions Bot added the stale label Jul 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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. needs-ci PRs that need a full CI run. stale

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fs.cpSync with dereference: true does not dereference (regression in 22.17)

8 participants