mirror of
https://github.com/rclone/rclone.git
synced 2024-12-22 15:11:56 +01:00
protondrive: fix nil pointer crash when when downloading native document file
Fixes #7959
This commit is contained in:
parent
4824837eed
commit
800ebb6480
@ -883,7 +883,9 @@ func (o *Object) Storable() bool {
|
|||||||
|
|
||||||
// Open opens the file for read. Call Close() on the returned io.ReadCloser
|
// Open opens the file for read. Call Close() on the returned io.ReadCloser
|
||||||
func (o *Object) Open(ctx context.Context, options ...fs.OpenOption) (io.ReadCloser, error) {
|
func (o *Object) Open(ctx context.Context, options ...fs.OpenOption) (io.ReadCloser, error) {
|
||||||
|
if o.originalSize != nil {
|
||||||
fs.FixRangeOption(options, *o.originalSize)
|
fs.FixRangeOption(options, *o.originalSize)
|
||||||
|
}
|
||||||
var offset, limit int64 = 0, -1
|
var offset, limit int64 = 0, -1
|
||||||
for _, option := range options { // if the caller passes in nil for options, it will become array of nil
|
for _, option := range options { // if the caller passes in nil for options, it will become array of nil
|
||||||
switch x := option.(type) {
|
switch x := option.(type) {
|
||||||
|
Loading…
Reference in New Issue
Block a user