diff --git a/backend/s3/s3.go b/backend/s3/s3.go index 36b6a9e61..9a255689e 100644 --- a/backend/s3/s3.go +++ b/backend/s3/s3.go @@ -3235,8 +3235,8 @@ func (ls *v2List) List(ctx context.Context) (resp *s3.ListObjectsV2Output, versi if err != nil { return nil, nil, err } - if aws.BoolValue(resp.IsTruncated) && (resp.ContinuationToken == nil || *resp.ContinuationToken == "") { - return nil, nil, errors.New("s3 protocol error: received listing v2 with IsTruncated set and no ContinuationToken. Should you be using `--s3-list-version 1`?") + if aws.BoolValue(resp.IsTruncated) && (resp.NextContinuationToken == nil || *resp.NextContinuationToken == "") { + return nil, nil, errors.New("s3 protocol error: received listing v2 with IsTruncated set and no NextContinuationToken. Should you be using `--s3-list-version 1`?") } ls.req.ContinuationToken = resp.NextContinuationToken return resp, nil, nil