snapshots: return error if readSnapshot fails
Signed-off-by: Wei Fu <fuweid89@gmail.com>
This commit is contained in:
parent
c038a7c4b1
commit
843423ec38
@ -306,7 +306,7 @@ func Remove(ctx context.Context, key string) (string, snapshots.Kind, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if err := readSnapshot(sbkt, &id, &si); err != nil {
|
if err := readSnapshot(sbkt, &id, &si); err != nil {
|
||||||
errors.Wrapf(err, "failed to read snapshot %s", key)
|
return errors.Wrapf(err, "failed to read snapshot %s", key)
|
||||||
}
|
}
|
||||||
|
|
||||||
if pbkt != nil {
|
if pbkt != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user