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

If current package folder is null don't delete #870

Merged
merged 1 commit into from
Jun 2, 2017
Merged

If current package folder is null don't delete #870

merged 1 commit into from
Jun 2, 2017

Conversation

AndrewJack
Copy link
Contributor

Fixes: #795

I've seen this in my crashlytics logs - same as the above issue.

Issue: getCurrentPackageFolderPath() can return null

Solution: check if path is null before deleting the directory.

@msftclas
Copy link

msftclas commented Jun 1, 2017

@AndrewJack,
Thanks for having already signed the Contribution License Agreement. Your agreement was validated by Microsoft. We will now review your pull request.
Thanks,
Microsoft Pull Request Bot

Copy link
Contributor

@max-mironov max-mironov left a comment

Choose a reason for hiding this comment

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

Good catch and thank you for contribution @AndrewJack!
LGTM!
Also not a huge deal but but what do you think of moving this check inside deleteDirectoryAtPath method (also can add CodePushUtils.log stating that there was attempt to delete null path)? I've looked briefly through other calls to this method and looks like we don't have any issues with this currently but may be useful to have this check here somewhere in future? Anyway its up to you and I'm good with both decisions and thanks again for helping us to make the project better!

@AndrewJack
Copy link
Contributor Author

@matrosov-nikita I've made those suggested changes

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

4 participants