forked from TrueCloudLab/frostfs-s3-gw
Fixed possible NPE in PutObject
Signed-off-by: Evgeniy Kulikov <kim@nspcc.ru>
This commit is contained in:
parent
447a255d18
commit
fb00af23fb
1 changed files with 4 additions and 1 deletions
|
@ -288,7 +288,10 @@ func (n *layer) PutObject(ctx context.Context, p *PutObjectParams) (*ObjectInfo,
|
|||
|
||||
_, err = n.objectFindID(ctx, cid, p.Object, true)
|
||||
if err == nil {
|
||||
return nil, err
|
||||
return nil, &api.ObjectAlreadyExists{
|
||||
Bucket: p.Bucket,
|
||||
Object: p.Object,
|
||||
}
|
||||
}
|
||||
|
||||
oid, err := refs.NewObjectID()
|
||||
|
|
Loading…
Reference in a new issue