ipfs / go-ds-flatfs

A datastore implementation using sharded directories and flat files to store data
MIT License
46 stars 21 forks source link

check error before defer-removing disk usage file #47

Closed b5 closed 6 years ago

b5 commented 6 years ago

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 😉

b5 commented 6 years ago

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

kevina commented 6 years ago

Thanks.

Merged.