Merge pull request #30378 from mlaventure/fix-negative-size
Ensure proper value is used when computing reclaimable space
Upstream-commit: f35f889c10
Component: cli
This commit is contained in:
@ -196,7 +196,10 @@ func (c *diskUsageImagesContext) Reclaimable() string {
|
||||
c.AddHeader(reclaimableHeader)
|
||||
for _, i := range c.images {
|
||||
if i.Containers != 0 {
|
||||
used += i.Size
|
||||
if i.VirtualSize == -1 || i.SharedSize == -1 {
|
||||
continue
|
||||
}
|
||||
used += i.VirtualSize - i.SharedSize
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user