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