From fabeb8e44e5f6c64736957a8c03661d1bf7590f4 Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Fri, 24 Nov 2023 12:35:35 +0000 Subject: [PATCH] b2: fix server side chunked copy when file size was exactly --b2-copy-cutoff Before this change the b2 servers would complain as this was only a single part transfer. This was noticed by the new integration tests for server side chunked copy. --- backend/b2/b2.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 {