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

[5.2] Optimize Filesystem moveDirectory #14362

Merged
merged 2 commits into from
Jul 21, 2016
Merged

Conversation

bepsvpt
Copy link
Contributor

@bepsvpt bepsvpt commented Jul 18, 2016

When move directory with overwrite flag, the first step is deleting the target directory.

In the delete step, we should check the return value, we could go on if it succeed.

After deleting the target directory, we use rename function to move the directory instead of coping and deleting.

@GrahamCampbell GrahamCampbell changed the title Optimize Filesystem moveDirectory [5.2] Optimize Filesystem moveDirectory Jul 18, 2016
@JoostK
Copy link
Contributor

JoostK commented Jul 18, 2016

Oh look, the line below does exactly the same 😉 You may therefore just drop the rename inside the if statement 👍

It is also possible to condense the nested if-clause into the first, however keeping it like this is clearer as it separates the condition from the action.

@taylorotwell taylorotwell merged commit be43de2 into laravel:5.2 Jul 21, 2016
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.

3 participants