mirror of
https://github.com/containers/podman.git
synced 2025-06-24 03:08:13 +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 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())
|
||||
}
|
||||
|
Reference in New Issue
Block a user