mirror of
https://github.com/rclone/rclone.git
synced 2024-11-22 16:07:57 +08:00
mega: return error if an unknown length file is attempted to be uploaded
This fixes the integration test created in #2947 to attempt to flush out non-conforming backends.
This commit is contained in:
parent
99c37028ee
commit
a0016e00d1
|
@ -1076,6 +1076,9 @@ func (o *Object) Open(options ...fs.OpenOption) (in io.ReadCloser, err error) {
|
|||
// The new object may have been created if an error is returned
|
||||
func (o *Object) Update(in io.Reader, src fs.ObjectInfo, options ...fs.OpenOption) (err error) {
|
||||
size := src.Size()
|
||||
if size < 0 {
|
||||
return errors.New("mega backend can't upload a file of unknown length")
|
||||
}
|
||||
//modTime := src.ModTime()
|
||||
remote := o.Remote()
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user