mirror of
https://github.com/containers/podman.git
synced 2025-06-20 00:51:16 +08:00
Wrap error for failing ImageSize calls
Signed-off-by: Sascha Grunert <sgrunert@suse.com>
This commit is contained in:
@ -709,11 +709,12 @@ func (i *Image) Size(ctx context.Context) (*uint64, error) {
|
||||
}
|
||||
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)
|
||||
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
|
||||
|
Reference in New Issue
Block a user