cache: parse the correct field for offset

commit 10697a05a2 introduced the issue.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit is contained in:
Giuseppe Scrivano 2022-01-13 10:54:46 +01:00
parent 96c0403bb1
commit ab25eafc17
No known key found for this signature in database
GPG Key ID: 67E38F7A8BA21772
1 changed files with 1 additions and 1 deletions

View File

@ -474,7 +474,7 @@ func (c *layersCache) findDigestInternal(digest string) (string, string, int64,
if digest != "" {
position := string(layer.metadata.vdata[off : off+len])
parts := strings.SplitN(position, "@", 2)
offFile, _ := strconv.ParseInt(parts[1], 10, 64)
offFile, _ := strconv.ParseInt(parts[0], 10, 64)
return layer.target, parts[1], offFile, nil
}
}