node icon indicating copy to clipboard operation
node copied to clipboard

fs: fix errorOnExist behavior for directory copy in fs.cp

Open npaun opened this issue 1 month ago • 2 comments

Fixes https://github.com/nodejs/node/issues/58947. This implements the errorOnExists check for onDir, which we previously had only for onFile.

npaun avatar Dec 03 '25 20:12 npaun

Codecov Report

:white_check_mark: All modified and coverable lines are covered by tests. :white_check_mark: Project coverage is 88.51%. Comparing base (746c3c2) to head (5c9b517). :warning: Report is 8 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #60946      +/-   ##
==========================================
- Coverage   88.53%   88.51%   -0.02%     
==========================================
  Files         703      703              
  Lines      208406   208415       +9     
  Branches    40198    40200       +2     
==========================================
- Hits       184502   184478      -24     
- Misses      15901    15941      +40     
+ Partials     8003     7996       -7     
Files with missing lines Coverage Δ
lib/internal/fs/cp/cp.js 88.35% <100.00%> (-2.07%) :arrow_down:

... and 38 files with indirect coverage changes

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

codecov[bot] avatar Dec 03 '25 21:12 codecov[bot]

CI: https://ci.nodejs.org/job/node-test-pull-request/70385/

nodejs-github-bot avatar Dec 04 '25 14:12 nodejs-github-bot