prettier checkpoint close
This commit is contained in:
parent
64cda4aeda
commit
72333147d3
@ -66,12 +66,15 @@ func (cp *Checkpoint) Set(c cid.Cid) error {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (cp *Checkpoint) Close() (err error) {
|
func (cp *Checkpoint) Close() error {
|
||||||
if cp.file != nil {
|
if cp.file == nil {
|
||||||
err = cp.file.Close()
|
return nil
|
||||||
cp.file = nil
|
|
||||||
cp.buf = nil
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
err := cp.file.Close()
|
||||||
|
cp.file = nil
|
||||||
|
cp.buf = nil
|
||||||
|
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user