Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit fc08a9b

Browse filesBrowse files
rayark1RafaelGSS
authored andcommitted
fs: refactor handleTimestampsAndMode to remove redundant call
Refactored the `handleTimestampsAndMode` function to eliminate the redundant `setDestTimestampsAndMode` call. This simplifies the function by ensuring that `setDestTimestampsAndMode` is only called once after any necessary modifications to file writability. PR-URL: #54369 Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
1 parent 467ac3a commit fc08a9b
Copy full SHA for fc08a9b

File tree

Expand file treeCollapse file tree

1 file changed

+0
-1
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+0
-1
lines changed
Open diff view settings
Collapse file

‎lib/internal/fs/cp/cp.js‎

Copy file name to clipboardExpand all lines: lib/internal/fs/cp/cp.js
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,6 @@ async function handleTimestampsAndMode(srcMode, src, dest) {
270270
// (through utimes call)
271271
if (fileIsNotWritable(srcMode)) {
272272
await makeFileWritable(dest, srcMode);
273-
return setDestTimestampsAndMode(srcMode, src, dest);
274273
}
275274
return setDestTimestampsAndMode(srcMode, src, dest);
276275
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.