mirror of
https://github.com/rclone/rclone.git
synced 2025-01-11 16:58:24 +01:00
acd: Fix overwriting a file with a zero length file
This commit is contained in:
parent
318e335137
commit
2302179237
@ -832,9 +832,9 @@ func (o *Object) Update(in io.Reader, src fs.ObjectInfo) error {
|
|||||||
start := time.Now()
|
start := time.Now()
|
||||||
o.fs.startUpload()
|
o.fs.startUpload()
|
||||||
if size != 0 {
|
if size != 0 {
|
||||||
info, resp, err = file.OverwriteSized(in, size)
|
|
||||||
} else {
|
|
||||||
info, resp, err = file.Overwrite(in)
|
info, resp, err = file.Overwrite(in)
|
||||||
|
} else {
|
||||||
|
info, resp, err = file.OverwriteSized(in, size)
|
||||||
}
|
}
|
||||||
o.fs.stopUpload()
|
o.fs.stopUpload()
|
||||||
var ok bool
|
var ok bool
|
||||||
|
Loading…
Reference in New Issue
Block a user