From 035a8ec52ad750ab0987f8b431b9e6b2053667ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucas=20Fran=C3=A7a=20de=20Oliveira?= Date: Thu, 25 May 2023 14:56:05 -0700 Subject: [PATCH] Fix panic in the s3 backend walk logic MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Lucas França de Oliveira --- registry/storage/driver/s3-aws/s3.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/registry/storage/driver/s3-aws/s3.go b/registry/storage/driver/s3-aws/s3.go index 077946b09..8753b3455 100644 --- a/registry/storage/driver/s3-aws/s3.go +++ b/registry/storage/driver/s3-aws/s3.go @@ -1070,7 +1070,7 @@ func (d *driver) doWalk(parentCtx context.Context, objectCount *int64, path, pre // the most recent skip directory to avoid walking over undesirable files prevSkipDir string ) - prevDir = prefix + path + prevDir = strings.Replace(path, d.s3Path(""), prefix, 1) listObjectsInput := &s3.ListObjectsV2Input{ Bucket: aws.String(d.Bucket),