"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
rcat: honor --dry-run even for small files
Stefan Breuniga91448c83a7c
diff --git a/fs/operations.go b/fs/operations.goindex ebfe8c049..2e5cb664b 100644--- a/fs/operations.go+++ b/fs/operations.go@@ -1618,6 +1618,10 @@ func Rcat(fdst Fs, dstFileName string, in0 io.ReadCloser, modTime time.Time) (erin := ioutil.NopCloser(bytes.NewReader(buf[:n]))in = NewAccountSizeName(in, int64(n), dstFileName).WithBuffer()objInfo := NewStaticObjectInfo(dstFileName, modTime, int64(n), false, nil, nil)+ if Config.DryRun {+ Logf("stdin", "Not uploading as --dry-run")+ return nil+ }dst, err := fdst.Put(in, objInfo, hashOption)if err != nil {return err@@ -1646,7 +1650,7 @@ func Rcat(fdst Fs, dstFileName string, in0 io.ReadCloser, modTime time.Time) (erin = NewAccountSizeName(in, -1, dstFileName).WithBuffer()if Config.DryRun {- Logf("stdin", "Not copying as --dry-run")+ Logf("stdin", "Not uploading as --dry-run")// prevents "broken pipe" errors_, err = io.Copy(ioutil.Discard, in)return err