Skip to content

Commit

Permalink
fs: refactor to remove redundant validation
Browse files Browse the repository at this point in the history
The function makeCallback already calls validateCallback, so the call
inside copyFile can be removed.

PR-URL: #36984
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
RaisinTen authored and targos committed Feb 2, 2021
1 parent 56377d6 commit 97fc7d8
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions lib/fs.js
Original file line number Diff line number Diff line change
Expand Up @@ -2036,8 +2036,6 @@ function copyFile(src, dest, mode, callback) {
if (typeof mode === 'function') {
callback = mode;
mode = 0;
} else {
validateCallback(callback);
}

src = getValidatedPath(src, 'src');
Expand Down

0 comments on commit 97fc7d8

Please sign in to comment.