1
0
mirror of https://github.com/rclone/rclone.git synced 2026-01-27 06:43:27 +00:00

Compare commits

...

1 Commits

Author SHA1 Message Date
Nick Craig-Wood
3c95651dcb protondrive: fix crash when original size isn't known on Open - Fixes #9117 2026-01-23 17:00:43 +00:00

View File

@@ -904,7 +904,7 @@ func (o *Object) Storable() bool {
// 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) {
fs.FixRangeOption(options, *o.originalSize)
fs.FixRangeOption(options, o.Size())
var offset, limit int64 = 0, -1
for _, option := range options { // if the caller passes in nil for options, it will become array of nil
switch x := option.(type) {