Skip to content
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

Ensure copy filter fn is not called more than needed #883

Merged
merged 1 commit into from Apr 16, 2021

Conversation

@RyanZim
Copy link
Collaborator

@RyanZim RyanZim commented Apr 2, 2021

Fixes #809

We need to check filter before creating a parent directory for dest, in case the filter cancels the entire operation. After creating the parent (if needed), we were calling a function that rechecked the filter, which wasn't needed, and resulted in the filter fn being called twice at the root level.

With these changes, we should possibly consider renaming some functions, as it doesn't seem to make much sense anymore.

@RyanZim RyanZim added this to the 10.0.0 milestone Apr 2, 2021
@RyanZim RyanZim requested a review from manidlou Apr 2, 2021
@RyanZim
Copy link
Collaborator Author

@RyanZim RyanZim commented Apr 15, 2021

@manidlou ping!

Copy link
Collaborator

@manidlou manidlou left a comment

LGTM

@RyanZim RyanZim merged commit af35401 into master Apr 16, 2021
4 checks passed
@RyanZim RyanZim deleted the ryan/copy-filter-calls branch Apr 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

2 participants