jottacloud: fix MD5 error check

This commit is contained in:
Oliver Heyme 2018-08-17 19:05:04 +02:00 committed by Nick Craig-Wood
parent 6390dec7db
commit 040768383b

View File

@ -763,7 +763,7 @@ func (o *Object) Update(in io.Reader, src fs.ObjectInfo, options ...fs.OpenOptio
}
md5, err := src.Hash(hash.MD5)
if err != nil {
if err == nil && md5 != "" {
opts.ExtraHeaders["JMd5"] = md5
opts.Parameters.Set("cphash", md5)
}