mirror of
https://github.com/containers/podman.git
synced 2025-06-17 06:57:43 +08:00
Merge pull request #5079 from openSUSE/error-image-size
Wrap error for failing ImageSize calls
This commit is contained in:
@ -709,11 +709,12 @@ func (i *Image) Size(ctx context.Context) (*uint64, error) {
|
|||||||
}
|
}
|
||||||
i.image = localImage
|
i.image = localImage
|
||||||
}
|
}
|
||||||
if sum, err := i.imageruntime.store.ImageSize(i.ID()); err == nil && sum >= 0 {
|
sum, err := i.imageruntime.store.ImageSize(i.ID())
|
||||||
|
if err == nil && sum >= 0 {
|
||||||
usum := uint64(sum)
|
usum := uint64(sum)
|
||||||
return &usum, nil
|
return &usum, nil
|
||||||
}
|
}
|
||||||
return nil, errors.Errorf("unable to determine size")
|
return nil, errors.Wrap(err, "unable to determine size")
|
||||||
}
|
}
|
||||||
|
|
||||||
// toImageRef returns an Image Reference type from an image
|
// toImageRef returns an Image Reference type from an image
|
||||||
|
Reference in New Issue
Block a user