Skip to content

"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files

sync: fix incorrect error reported by graceful cutoff - fixes #5203

Nick Craig-Wood54771e440218
diff --git a/fs/sync/sync.go b/fs/sync/sync.go
index a97231424..4958479f7 100644
--- a/fs/sync/sync.go
+++ b/fs/sync/sync.go
@@ -266,6 +266,9 @@ func (s *syncCopyMove) processError(err error) {
// Cancel the march and stop the pipes
s.inCancel()
}
+ } else if err == context.Canceled && s.inCtx.Err() != nil {
+ // Ignore context Canceled if we have called s.inCancel()
+ return
}
s.errorMu.Lock()
defer s.errorMu.Unlock()