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 {