"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files
Go azure-blobazure-blob-storageazure-filesbackblaze-b2cloud-storagedropboxencryptionftpfuse-filesystemgogolanggoogle-cloud-storagegoogle-driveonedriveopenstack-swiftrclones3sftpsyncwebdav
operations: fix server side copies on partial upload backends after refactor
Nick Craig-Wood23ab6fa3a0ca
diff --git a/fs/operations/copy.go b/fs/operations/copy.goindex a2a2ebebd..596c7ed04 100644--- a/fs/operations/copy.go+++ b/fs/operations/copy.go@@ -146,11 +146,8 @@ func (c *copy) serverSideCopy(ctx context.Context) (actionTaken string, newDst fnewDst, err = doCopy(ctx, c.src, c.remoteForCopy)if err == nil {in.ServerSideCopyEnd(newDst.Size()) // account the bytes for the server-side transfer- _ = in.Close()- c.inplace = true- } else {- _ = in.Close()}+ _ = in.Close()if errors.Is(err, fs.ErrorCantCopy) {c.tr.Reset(ctx) // skip incomplete accounting - will be overwritten by the manual copy}