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

b2: fix server side chunked copy when file size was exactly --b2-copy-cutoff

Nick Craig-Woodfabeb8e44e5f
diff --git a/backend/b2/b2.go b/backend/b2/b2.go
index 870a8178e..778d856f1 100644
--- a/backend/b2/b2.go
+++ b/backend/b2/b2.go
@@ -1338,7 +1338,7 @@ func (f *Fs) CleanUp(ctx context.Context) error {
// If newInfo is nil then the metadata will be copied otherwise it
// will be replaced with newInfo
func (f *Fs) copy(ctx context.Context, dstObj *Object, srcObj *Object, newInfo *api.File) (err error) {
- if srcObj.size >= int64(f.opt.CopyCutoff) {
+ if srcObj.size > int64(f.opt.CopyCutoff) {
if newInfo == nil {
newInfo, err = srcObj.getMetaData(ctx)
if err != nil {