"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
fs: Verify sizes are the same after transfer in Copy()
Nick Craig-Woode559194fb2a7
diff --git a/fs/operations.go b/fs/operations.goindex 0fd62d90e..6b56792e5 100644--- a/fs/operations.go+++ b/fs/operations.go@@ -142,6 +142,15 @@ func Copy(f Fs, dst, src Object) {return}+ // Verify sizes are the same after transfer+ if src.Size() != dst.Size() {+ Stats.Error()+ err = fmt.Errorf("Corrupted on transfer: sizes differ %d vs %d", src.Size(), dst.Size())+ Log(dst, "%s", err)+ removeFailedCopy(dst)+ return+ }+// Verify md5sums are the same after transfer - ignoring blank md5sumssrcMd5sum, md5sumErr := src.Md5sum()if md5sumErr != nil {