Skip to content

Commit

Permalink
cache: parse the correct field for offset
Browse files Browse the repository at this point in the history
commit 10697a0 introduced the issue.

Signed-off-by: Giuseppe Scrivano <[email protected]>
  • Loading branch information
giuseppe committed Jan 13, 2022
1 parent 3030d33 commit 59c62b9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/chunked/cache_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
Expand Down

0 comments on commit 59c62b9

Please sign in to comment.