Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docker tarfile: report correct size of compressed layers
Tools like umoci will always compress layers, and in order to work around some *lovely* issues with DiffIDs, tarfile.GetBlob would always decompress them. However the BlobInfo returned from tarfile.GetBlob would incorrectly give the size of the *compressed* layer because the size caching code didn't actually check the layer size, resulting in "skopeo copy" failing whenever sourcing umoci images. As an aside, for some reason the oci: transport doesn't report errors when the size is wrong... Signed-off-by: Aleksa Sarai <[email protected]> (Updated primarily to handle closing the decompressed stream.) Signed-off-by: Miloslav Trmač <[email protected]>
- Loading branch information