acd: Fix overwriting a file with a zero length file
This commit is contained in:
parent
318e335137
commit
2302179237
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue