mirror of https://github.com/containers/podman.git
Merge pull request #3718 from QiWang19/df_imgindex
fix system df crashes on unnamed images
This commit is contained in:
commit
a15432afe6
|
@ -460,11 +460,11 @@ func getImageVerboseDiskUsage(ctx context.Context, images []*image.Image, images
|
|||
}
|
||||
var repo string
|
||||
var tag string
|
||||
if len(img.Names()) == 0 {
|
||||
repo = "<none>"
|
||||
tag = "<none>"
|
||||
var repotags []string
|
||||
if len(img.Names()) != 0 {
|
||||
repotags = []string{img.Names()[0]}
|
||||
}
|
||||
repopairs, err := image.ReposToMap([]string{img.Names()[0]})
|
||||
repopairs, err := image.ReposToMap(repotags)
|
||||
if err != nil {
|
||||
logrus.Errorf("error finding tag/digest for %s", img.ID())
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue