Merge pull request #349 from RichardScothern/348
Prevent Close() from being called after Finish()
This commit is contained in:
commit
65f19a7e02
@ -109,6 +109,10 @@ func (lw *layerWriter) ReadFrom(r io.Reader) (n int64, err error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (lw *layerWriter) Close() error {
|
func (lw *layerWriter) Close() error {
|
||||||
|
if lw.err != nil {
|
||||||
|
return lw.err
|
||||||
|
}
|
||||||
|
|
||||||
if err := lw.storeHashState(); err != nil {
|
if err := lw.storeHashState(); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user