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

Create dest parent after applying filter in copy #517

Merged
merged 1 commit into from Nov 10, 2017
Merged

Conversation

manidlou
Copy link
Collaborator

@manidlou manidlou commented Nov 9, 2017

When applying filter, I think this is a little bit better than before although it still highly depends on the user's filter conditions!

But at least, if users choose their filter conditions intelligently, this way, copy() correctly doesn't create dest parent directory since its child path fails on filter.

This is until @RyanZim adds his changes for filter function.

@manidlou manidlou requested a review from RyanZim November 9, 2017 21:35
@coveralls
Copy link

Coverage Status

Coverage remained the same at 86.1% when pulling 9639c69 on copy-parent-dir into b72ba64 on develop.

Copy link
Collaborator

@RyanZim RyanZim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the idea here, however, the implementation is flawed.

Before your changes, startCopy simply checked the filter and started the copy. Now, startCopy does pathExists/mkdirp work as well. However, startCopy is called when recursively copying items in subdirectories. In those cases, the destination exists logic has already been done, so this could have a major perf hit since we're double-doing the destination checking.

@manidlou
Copy link
Collaborator Author

manidlou commented Nov 9, 2017

That's true. Let me see what I can do here!

@coveralls
Copy link

Coverage Status

Coverage increased (+0.01%) to 86.114% when pulling 8ca1074 on copy-parent-dir into b72ba64 on develop.

Copy link
Collaborator

@RyanZim RyanZim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good; please squash to one commit.

@manidlou
Copy link
Collaborator Author

manidlou commented Nov 9, 2017

Looks good; please squash to one commit.

Sure thing.

@manidlou
Copy link
Collaborator Author

manidlou commented Nov 9, 2017

Squash done!

@coveralls
Copy link

Coverage Status

Coverage increased (+0.01%) to 86.114% when pulling 199ec9f on copy-parent-dir into b72ba64 on develop.

@RyanZim RyanZim merged commit 03fba97 into develop Nov 10, 2017
@manidlou manidlou deleted the copy-parent-dir branch November 10, 2017 01:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants