mirror of
https://github.com/rclone/rclone.git
synced 2024-11-26 10:13:52 +08:00
onedrive: return err instead of panic on unknown-sized uploads
This commit is contained in:
parent
c496efe9a4
commit
7b20139c6a
|
@ -1602,7 +1602,7 @@ func (o *Object) Update(in io.Reader, src fs.ObjectInfo, options ...fs.OpenOptio
|
||||||
} else if size == 0 {
|
} else if size == 0 {
|
||||||
info, err = o.uploadSinglepart(in, size, modTime)
|
info, err = o.uploadSinglepart(in, size, modTime)
|
||||||
} else {
|
} else {
|
||||||
panic("src file size must be >= 0")
|
return errors.New("unknown-sized upload not supported")
|
||||||
}
|
}
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
|
Loading…
Reference in New Issue
Block a user