Commit e600f00
committed
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.
PR-URL: #65678
Signed-off-by: Abhinandan Kumar <abhi128618@gmail.com>1 parent 104285a commit e600f00
2 files changed
Lines changed: 28 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4207 | 4207 | | |
4208 | 4208 | | |
4209 | 4209 | | |
| 4210 | + | |
| 4211 | + | |
| 4212 | + | |
| 4213 | + | |
4210 | 4214 | | |
4211 | 4215 | | |
4212 | 4216 | | |
| |||
4231 | 4235 | | |
4232 | 4236 | | |
4233 | 4237 | | |
4234 | | - | |
| 4238 | + | |
| 4239 | + | |
| 4240 | + | |
4235 | 4241 | | |
4236 | 4242 | | |
4237 | 4243 | | |
| |||
Lines changed: 21 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
| 1 | + | |
| 2 | + | |
| 3 | + | |
3 | 4 | | |
4 | 5 | | |
5 | 6 | | |
| |||
40 | 41 | | |
41 | 42 | | |
42 | 43 | | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
0 commit comments