Merge pull request #5013 from vrothberg/fix-4916

history: fix size computing
This commit is contained in:
OpenShift Merge Robot 2020-01-29 07:23:32 -08:00 committed by GitHub
commit 955866c97d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -831,7 +831,8 @@ func (i *Image) History(ctx context.Context) ([]*History, error) {
id := "<missing>"
if x == numHistories {
id = i.ID()
} else if layer != nil {
}
if layer != nil {
if !oci.History[x].EmptyLayer {
size = layer.UncompressedSize
}