diff --git a/api/layer/multipart_upload.go b/api/layer/multipart_upload.go index c48f5387..39fe378c 100644 --- a/api/layer/multipart_upload.go +++ b/api/layer/multipart_upload.go @@ -548,7 +548,7 @@ func (n *layer) ListParts(ctx context.Context, p *ListPartsParams) (*ListPartsIn return parts[i].PartNumber < parts[j].PartNumber }) - if p.PartNumberMarker >= parts[len(parts)-1].PartNumber { + if len(parts) == 0 || p.PartNumberMarker >= parts[len(parts)-1].PartNumber { res.Parts = make([]*Part, 0) return &res, nil }