forked from TrueCloudLab/frostfs-s3-gw
[#515] Fix nil reference when a part is missing
Signed-off-by: Angira Kekteeva <kira@nspcc.ru>
This commit is contained in:
parent
93a7c2eaeb
commit
3f5afabd4a
1 changed files with 1 additions and 1 deletions
|
@ -340,7 +340,7 @@ func (n *layer) CompleteMultipartUpload(ctx context.Context, p *CompleteMultipar
|
|||
var completedPartsHeader strings.Builder
|
||||
for i, part := range p.Parts {
|
||||
partInfo := partsInfo[part.PartNumber]
|
||||
if part.ETag != partInfo.ETag {
|
||||
if partInfo == nil || part.ETag != partInfo.ETag {
|
||||
return nil, nil, errors.GetAPIError(errors.ErrInvalidPart)
|
||||
}
|
||||
// for the last part we have no minimum size limit
|
||||
|
|
Loading…
Reference in a new issue