fs: fix opts.filter issue in cpSync#45143
Merged
nodejs-github-bot merged 1 commit intonodejs:mainfrom Nov 1, 2022
Merged
Conversation
thoqbk
commented
Oct 24, 2022
thoqbk
commented
Oct 24, 2022
| return checkParentPathsSync(src, srcStat, destParent); | ||
| } | ||
|
|
||
| function handleFilterAndCopy(destStat, src, dest, opts) { |
Contributor
Author
There was a problem hiding this comment.
change the name to make it consistent with cp-async
9033729 to
bf2dde5
Compare
aduh95
approved these changes
Oct 25, 2022
Contributor
aduh95
left a comment
There was a problem hiding this comment.
Changes LGTM, if you want to open a separate PR to investigate why the options object gets mutated that'd be great!
Collaborator
Collaborator
17 tasks
Collaborator
|
Landed in a14fc49 |
Merged
This was referenced Nov 2, 2022
lucshi
pushed a commit
to lucshi/node
that referenced
this pull request
Nov 9, 2022
PR-URL: nodejs#45143 Fixes: nodejs#44720 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes: #44720
replicate #44922 for cpSync
issues:
opts.filterproperly.As a result, the path validation logic still gets triggered
even though the file or folder is filtered out
opts.filtere.g. need to call
opts.filter(src, dest)in several placeschanges:
checkPathsSyncas a central place to validate the paths(with consideration of opts.filter) before copying
startCopy, change function namehandleFilterAndCopyto
checkParentDirto make it consistent with copy async