ui bug on bad analysis result

This commit is contained in:
Alex Goodman 2019-10-04 10:05:25 -04:00
parent 49c0002a0e
commit 56e8530dea
No known key found for this signature in database
GPG Key ID: 98AF011C5C78EB7E

@ -115,12 +115,10 @@ func (img *ImageDirectoryRef) ToImage() (*image.Image, error) {
// note that the resolver config stores images in reverse chronological order, so iterate backwards through layers
// as you iterate chronologically through history (ignoring history items that have no layer contents)
// Note: history is not required metadata in a docker image!
tarPathIdx := 0
for layerIdx := len(trees) - 1; layerIdx >= 0; layerIdx-- {
id := img.layerOrder[layerIdx]
for layerIdx, id := range img.layerOrder {
layers[layerIdx] = &layer{
obj: img.layerMap[id],
index: tarPathIdx,
index: layerIdx,
tree: trees[layerIdx],
}
}
@ -129,4 +127,5 @@ func (img *ImageDirectoryRef) ToImage() (*image.Image, error) {
Trees: trees,
Layers: layers,
}, nil
}