From 00ab5b973007e91e69e0d6c986bc77558e93ff12 Mon Sep 17 00:00:00 2001 From: Hitenjain14 Date: Sun, 5 Jan 2025 00:39:20 +0530 Subject: [PATCH] fix repair v2 --- zboxcore/sdk/repairworker.go | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/zboxcore/sdk/repairworker.go b/zboxcore/sdk/repairworker.go index ad1195bcb..319e23411 100644 --- a/zboxcore/sdk/repairworker.go +++ b/zboxcore/sdk/repairworker.go @@ -459,9 +459,17 @@ func (r *RepairRequest) iterateDirV2(ctx context.Context) { } diff.tgtRef, diff.tgtEOF = <-diff.tgtChan } else if diff.tgtRef.Path < srcRef.Path { - deleteMask = deleteMask.Or(diff.mask) + delMask := diff.mask + op := OperationRequest{ + OperationType: constants.FileOperationDelete, + RemotePath: diff.tgtRef.Path, + Mask: &delMask, + } + ops = append(ops, op) toNextRef = false diff.tgtRef, diff.tgtEOF = <-diff.tgtChan + } else { + uploadMask = uploadMask.Or(diff.mask) } } if deleteMask.CountOnes() > 0 {