mirror of
https://github.com/rclone/rclone.git
synced 2025-06-24 14:01:31 +02:00
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.
This commit is contained in:
parent
c27977d4d5
commit
fabeb8e44e
@ -1338,7 +1338,7 @@ func (f *Fs) CleanUp(ctx context.Context) error {
|
|||||||
// If newInfo is nil then the metadata will be copied otherwise it
|
// If newInfo is nil then the metadata will be copied otherwise it
|
||||||
// will be replaced with newInfo
|
// will be replaced with newInfo
|
||||||
func (f *Fs) copy(ctx context.Context, dstObj *Object, srcObj *Object, newInfo *api.File) (err error) {
|
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 {
|
if newInfo == nil {
|
||||||
newInfo, err = srcObj.getMetaData(ctx)
|
newInfo, err = srcObj.getMetaData(ctx)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user