1
0
mirror of https://git.mills.io/kayos/bitraft.git synced 2024-06-27 09:19:00 +00:00

Added missing error check (#3)

Please review this thoroughly, but I think adding an error check here makes
sense.
This commit is contained in:
Christian Muehlhaeuser 2019-07-19 12:24:44 +02:00 committed by James Mills
parent 5c68c022f1
commit 9a4b849054

@ -160,7 +160,9 @@ func (kvm *Machine) Restore(rd io.Reader) error {
if _, err := io.ReadFull(r, value); err != nil {
return err
}
kvm.db.Put(string(key), value)
if err := kvm.db.Put(string(key), value); err != nil {
return err
}
}
return gzr.Close()
}