forked from TrueCloudLab/rclone
s3: fix DisableChecksum condition
This commit is contained in:
parent
e2773b3b4e
commit
c05bb63f96
1 changed files with 1 additions and 1 deletions
|
@ -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
|
// read the md5sum if available for non multpart and if
|
||||||
// disable checksum isn't present.
|
// disable checksum isn't present.
|
||||||
var md5sum string
|
var md5sum string
|
||||||
if !multipart || !o.fs.opt.DisableChecksum {
|
if !multipart && !o.fs.opt.DisableChecksum {
|
||||||
hash, err := src.Hash(ctx, hash.MD5)
|
hash, err := src.Hash(ctx, hash.MD5)
|
||||||
if err == nil && matchMd5.MatchString(hash) {
|
if err == nil && matchMd5.MatchString(hash) {
|
||||||
hashBytes, err := hex.DecodeString(hash)
|
hashBytes, err := hex.DecodeString(hash)
|
||||||
|
|
Loading…
Add table
Reference in a new issue