forked from TrueCloudLab/frostfs-sdk-go
[#XX] client: Allow empty patches
Signed-off-by: Airat Arifullin <a.arifullin@yadro.com>
This commit is contained in:
parent
6009d089fc
commit
8a58ac120f
1 changed files with 4 additions and 4 deletions
|
@ -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{
|
||||||
|
|
Loading…
Reference in a new issue