From 23021792373f607d3537307c7a1550c08f74488e Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Wed, 2 Nov 2016 16:39:55 +0000 Subject: [PATCH] acd: Fix overwriting a file with a zero length file --- amazonclouddrive/amazonclouddrive.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/amazonclouddrive/amazonclouddrive.go b/amazonclouddrive/amazonclouddrive.go index 8a1e83fc1..da2f672d5 100644 --- a/amazonclouddrive/amazonclouddrive.go +++ b/amazonclouddrive/amazonclouddrive.go @@ -832,9 +832,9 @@ func (o *Object) Update(in io.Reader, src fs.ObjectInfo) error { start := time.Now() o.fs.startUpload() if size != 0 { - info, resp, err = file.OverwriteSized(in, size) - } else { info, resp, err = file.Overwrite(in) + } else { + info, resp, err = file.OverwriteSized(in, size) } o.fs.stopUpload() var ok bool