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 jasnell committed Jan 23, 2021
1 parent 3ec7114 commit ae5e95f
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 ae5e95f

Please sign in to comment.