-
Notifications
You must be signed in to change notification settings - Fork 30k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fs: fix opts.filter issue in cpSync #45143
Conversation
@@ -145,24 +153,12 @@ function checkParentPathsSync(src, srcStat, dest) { | |||
return checkParentPathsSync(src, srcStat, destParent); | |||
} | |||
|
|||
function handleFilterAndCopy(destStat, src, dest, opts) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
change the name to make it consistent with cp-async
9033729
to
bf2dde5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes LGTM, if you want to open a separate PR to investigate why the options
object gets mutated that'd be great!
Landed in a14fc49 |
PR-URL: #45143 Fixes: #44720 Reviewed-By: Antoine du Hamel <[email protected]>
PR-URL: nodejs#45143 Fixes: nodejs#44720 Reviewed-By: Antoine du Hamel <[email protected]>
PR-URL: #45143 Fixes: #44720 Reviewed-By: Antoine du Hamel <[email protected]>
PR-URL: #45143 Fixes: #44720 Reviewed-By: Antoine du Hamel <[email protected]>
PR-URL: #45143 Fixes: #44720 Reviewed-By: Antoine du Hamel <[email protected]>
PR-URL: #45143 Fixes: #44720 Reviewed-By: Antoine du Hamel <[email protected]>
Fixes: #44720
replicate #44922 for cpSync
issues:
opts.filter
properly.As a result, the path validation logic still gets triggered
even though the file or folder is filtered out
opts.filter
e.g. need to call
opts.filter(src, dest)
in several placeschanges:
checkPathsSync
as a central place to validate the paths(with consideration of opts.filter) before copying
startCopy
, change function namehandleFilterAndCopy
to
checkParentDir
to make it consistent with copy async