mirror of
https://github.com/rclone/rclone.git
synced 2025-04-19 18:31:10 +08:00
Merge d3bab98390d231be1f181a6a3f2538e1a2c841c1 into 4d38424e6cbb32d07c74d3b4d760af7afb35742d
This commit is contained in:
commit
2f539e3698
@ -362,7 +362,14 @@ func (o *Object) Open(ctx context.Context, options ...fs.OpenOption) (io.ReadClo
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
o.bytes = *bytes
|
||||
if bytes == nil {
|
||||
// Must set these as "defaults" since the HTTP payload is compressed and the handler will decompress by default,
|
||||
// otherwise we end up with a file size and hash mismatch
|
||||
o.bytes = -1
|
||||
o.md5 = ""
|
||||
} else {
|
||||
o.bytes = *bytes
|
||||
}
|
||||
return resp.HTTPResponse().Body, nil
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user