[#XX] client: Allow empty patches

Signed-off-by: Airat Arifullin <a.arifullin@yadro.com>
This commit is contained in:
Airat Arifullin 2024-09-18 12:41:54 +03:00
parent 6009d089fc
commit 8a58ac120f

View file

@ -176,10 +176,10 @@ func (x *objectPatcher) PatchPayload(_ context.Context, rng *object.Range, paylo
} }
if n == 0 { if n == 0 {
if patchIter == 0 { if patchIter == 0 {
if rng.GetLength() == 0 { // if rng.GetLength() == 0 {
x.err = errors.New("zero-length empty payload patch can't be applied") // x.err = errors.New("zero-length empty payload patch can't be applied")
return false // return false
} // }
if !x.patch(&object.Patch{ if !x.patch(&object.Patch{
Address: x.addr, Address: x.addr,
PayloadPatch: &object.PayloadPatch{ PayloadPatch: &object.PayloadPatch{