From c05bb63f9679e09ecb078e7477f3efd02846c2ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aleksandar=20Jankovi=C4=87?= Date: Mon, 2 Dec 2019 16:15:59 +0100 Subject: [PATCH] s3: fix DisableChecksum condition --- backend/s3/s3.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/s3/s3.go b/backend/s3/s3.go index c49d9c9b7..991e5bf4b 100644 --- a/backend/s3/s3.go +++ b/backend/s3/s3.go @@ -2040,7 +2040,7 @@ func (o *Object) Update(ctx context.Context, in io.Reader, src fs.ObjectInfo, op // read the md5sum if available for non multpart and if // disable checksum isn't present. var md5sum string - if !multipart || !o.fs.opt.DisableChecksum { + if !multipart && !o.fs.opt.DisableChecksum { hash, err := src.Hash(ctx, hash.MD5) if err == nil && matchMd5.MatchString(hash) { hashBytes, err := hex.DecodeString(hash)