diff --git a/pkg/chunked/storage_linux.go b/pkg/chunked/storage_linux.go index 7faccef1c1..7b81d790d7 100644 --- a/pkg/chunked/storage_linux.go +++ b/pkg/chunked/storage_linux.go @@ -241,6 +241,10 @@ func GetDiffer(ctx context.Context, store storage.Store, blobDigest digest.Diges return nil, err } + if !parseBooleanPullOption(&storeOpts, "enable_partial_images", true) { + return nil, errors.New("enable_partial_images not configured") + } + _, hasZstdChunkedTOC := annotations[internal.ManifestChecksumKey] _, hasEstargzTOC := annotations[estargz.TOCJSONDigestAnnotation] @@ -1701,10 +1705,6 @@ func (c *chunkedDiffer) ApplyDiff(dest string, options *archive.TarOptions, diff UncompressedDigest: uncompressedDigest, } - if !parseBooleanPullOption(c.storeOpts, "enable_partial_images", true) { - return output, errors.New("enable_partial_images not configured") - } - // When the hard links deduplication is used, file attributes are ignored because setting them // modifies the source file as well. useHardLinks := parseBooleanPullOption(c.storeOpts, "use_hard_links", false)