fs: preserve directory timestamps in cpSync fast path - #65678
Open
abhi128nandan wants to merge 1 commit into
Open
fs: preserve directory timestamps in cpSync fast path#65678abhi128nandan wants to merge 1 commit into
abhi128nandan wants to merge 1 commit into
Conversation
abhi128nandan
marked this pull request as ready for review
August 31, 2026 12:05
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #65678 +/- ##
==========================================
- Coverage 90.07% 90.06% -0.01%
==========================================
Files 754 754
Lines 256317 256400 +83
Branches 48476 48500 +24
==========================================
+ Hits 230871 230932 +61
- Misses 16563 16577 +14
- Partials 8883 8891 +8
🚀 New features to boost your workflow:
|
abhi128nandan
added a commit
to abhi128nandan/node
that referenced
this pull request
Aug 31, 2026
This completes the work started in PR nodejs#65540. While the previous PR fixed directory timestamp preservation for the JavaScript paths, the native C++ fast path (CpSyncCopyDir in src/node_file.cc) used by fs.cpSync when no filter is provided still failed to preserve directory timestamps. This commit invokes the existing CopyUtimes helper for both the root destination directory and all subdirectories after their contents are recursively copied. PR-URL: nodejs#65678 Signed-off-by: Abhinandan Kumar <abhi128618@gmail.com>
abhi128nandan
force-pushed
the
fix-cpsync-dir-timestamps
branch
from
August 31, 2026 18:02
6564718 to
e600f00
Compare
This completes the work started in PR nodejs#65540. The previous PR fixed directory timestamp preservation for the JavaScript paths, but the native C++ fast path (CpSyncCopyDir in src/node_file.cc) used by fs.cpSync when no filter is provided still failed to preserve directory timestamps. This commit invokes the existing CopyUtimes helper for both the root destination directory and all subdirectories after their contents are recursively copied, aligning the native behavior with the JavaScript fallback. PR-URL: nodejs#65678 Signed-off-by: Abhinandan Kumar <abhi128618@gmail.com>
abhi128nandan
force-pushed
the
fix-cpsync-dir-timestamps
branch
from
August 31, 2026 18:06
e600f00 to
9227f17
Compare
Contributor
Author
|
The Could someone please rerun the All other checks are currently passing. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fs: preserve directory timestamps in cpSync fast path
This completes the work started in PR #65540. While the previous PR fixed
directory timestamp preservation for the JavaScript paths, the native C++
fast path (CpSyncCopyDir in src/node_file.cc) used by fs.cpSync when no
filter is provided still failed to preserve directory timestamps.
This commit invokes the existing CopyUtimes helper for both the root
destination directory and all subdirectories after their contents are
recursively copied, perfectly aligning the native behavior with the
JavaScript fallback.
Signed-off-by: Abhinandan Kumar abhi128618@gmail.com