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
This commit is contained in:
parent
8053fc4e16
commit
b3815dc0c2
1 changed files with 3 additions and 2 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Reference in a new issue