From b3815dc0c27e21988717ec2f278e860fad180b78 Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Mon, 28 Dec 2020 12:05:49 +0000 Subject: [PATCH] sync: fix --immutable errors retrying many times See: https://forum.rclone.org/t/immutable-should-set-retries-1-when-source-and-dest-are-different/21326 --- fs/sync/sync.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/fs/sync/sync.go b/fs/sync/sync.go index c3c209e27..b37d0d2cc 100644 --- a/fs/sync/sync.go +++ b/fs/sync/sync.go @@ -319,8 +319,9 @@ func (s *syncCopyMove) pairChecker(in *pipe, out *pipe, fraction int, wg *sync.W if !NoNeedTransfer && operations.NeedTransfer(s.ctx, pair.Dst, pair.Src) { // If files are treated as immutable, fail if destination exists and does not match if s.ci.Immutable && pair.Dst != nil { - fs.Errorf(pair.Dst, "Source and destination exist but do not match: immutable file modified") - s.processError(fs.ErrorImmutableModified) + err := fs.CountError(fserrors.NoRetryError(fs.ErrorImmutableModified)) + fs.Errorf(pair.Dst, "Source and destination exist but do not match: %v", err) + s.processError(err) } else { // If destination already exists, then we must move it into --backup-dir if required if pair.Dst != nil && s.backupDir != nil {