Compare commits

...
Sign in to create a new pull request.

1 commit

Author SHA1 Message Date
8a58ac120f [#XX] client: Allow empty patches
Signed-off-by: Airat Arifullin <a.arifullin@yadro.com>
2024-09-18 12:41:54 +03:00

View file

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