Fix panic in the s3 backend walk logic

Signed-off-by: Lucas França de Oliveira <lucasfdo@palantir.com>
This commit is contained in:
Lucas França de Oliveira
2023-05-25 14:56:05 -07:00
parent 983358f8e2
commit 035a8ec52a

View File

@@ -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),