From b857a6a52e0d66e96dc02b7cfed87dc4f5eadcab Mon Sep 17 00:00:00 2001 From: nikpivkin Date: Mon, 27 Jan 2025 19:02:54 +0600 Subject: [PATCH] refactor: update comment Signed-off-by: nikpivkin --- pkg/fanal/artifact/image/image.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/fanal/artifact/image/image.go b/pkg/fanal/artifact/image/image.go index a193c7f42b20..c776c4492f5d 100644 --- a/pkg/fanal/artifact/image/image.go +++ b/pkg/fanal/artifact/image/image.go @@ -297,7 +297,8 @@ func (a Artifact) imageSize(ctx context.Context, diffIDs []string) (int64, error totalSize += layerSize completedLayers += 1 // If the layer size exceeds the limit during loading, return an error immediately. - // Otherwise, if the image is fully loaded, check the size later. + // Otherwise, if the image is fully loaded, check the size later + // to possibly work with the image if totalSize > a.artifactOption.ImageOption.MaxImageSize && completedLayers != len(diffIDs) { return a.imageSizeError("uncompressed layers", totalSize)