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

check error before defer-removing disk usage file #47

Merged
merged 1 commit into from
Sep 10, 2018

Conversation

b5
Copy link
Contributor

@b5 b5 commented Sep 10, 2018

Ran into this while updating our gx deps:
https://circleci.com/gh/qri-io/cafs/43

Not being able to write the temp file in the first place is the source of the failure, but handling errors before invoking defer statements on nil pointers is a good idea IMHO 😉

flatfs.go Show resolved Hide resolved
Copy link
Contributor

@kevina kevina left a comment

Choose a reason for hiding this comment

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

One Nit, but otherwise LGTM.

@b5
Copy link
Contributor Author

b5 commented Sep 10, 2018

👋 @kevina! Hope all is well in your neck of the woods 😄. Just force-pushed your requested changes.

@kevina kevina merged commit 99c0640 into ipfs:master Sep 10, 2018
@kevina
Copy link
Contributor

kevina commented Sep 10, 2018

Thanks.

Merged.

@b5 b5 deleted the switch_defer branch September 10, 2018 22:21
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.

2 participants