Skip to content

"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files

protondrive: fix segfault when copying files missing revision metadata

Nick Craig-Wood0737599cd4b4
diff --git a/backend/protondrive/protondrive.go b/backend/protondrive/protondrive.go
index af6485ee3..502ca7c9f 100644
--- a/backend/protondrive/protondrive.go
+++ b/backend/protondrive/protondrive.go
@@ -1019,7 +1019,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) {
diff --git a/go.mod b/go.mod
index e15051a7c..c04acc2cd 100644
--- a/go.mod
+++ b/go.mod
@@ -71,7 +71,7 @@ require (
github.com/prometheus/client_golang v1.23.2
github.com/putdotio/go-putio/putio v0.0.0-20200123120452-16d982cac2b8
github.com/quasilyte/go-ruleguard/dsl v0.3.23
- github.com/rclone/Proton-API-Bridge v1.0.2
+ github.com/rclone/Proton-API-Bridge v1.0.3
github.com/rclone/go-proton-api v1.0.2
github.com/rclone/gofakes3 v0.0.4
github.com/rfjakob/eme v1.2.0
diff --git a/go.sum b/go.sum
index 4ca7699ef..3705f595d 100644
--- a/go.sum
+++ b/go.sum
@@ -594,8 +594,8 @@ github.com/quic-go/quic-go v0.59.0 h1:OLJkp1Mlm/aS7dpKgTc6cnpynnD2Xg7C1pwL6vy/SA
github.com/quic-go/quic-go v0.59.0/go.mod h1:upnsH4Ju1YkqpLXC305eW3yDZ4NfnNbmQRCMWS58IKU=
github.com/rasky/go-xdr v0.0.0-20170124162913-1a41d1a06c93 h1:UVArwN/wkKjMVhh2EQGC0tEc1+FqiLlvYXY5mQ2f8Wg=
github.com/rasky/go-xdr v0.0.0-20170124162913-1a41d1a06c93/go.mod h1:Nfe4efndBz4TibWycNE+lqyJZiMX4ycx+QKV8Ta0f/o=
-github.com/rclone/Proton-API-Bridge v1.0.2 h1:YmN8lAbkQqJPjHaapg5QJyuPbcPC26SaS0jMKkm5UO8=
-github.com/rclone/Proton-API-Bridge v1.0.2/go.mod h1:26RAest751Ofk+F/d8xtl4UyWXrZvMQwn39U8rm/WKM=
+github.com/rclone/Proton-API-Bridge v1.0.3 h1:Bs7RC4xCFSN0BPIYVda/BNxp0qo3NV0gB2VZqx2KIew=
+github.com/rclone/Proton-API-Bridge v1.0.3/go.mod h1:26RAest751Ofk+F/d8xtl4UyWXrZvMQwn39U8rm/WKM=
github.com/rclone/go-proton-api v1.0.2 h1:cJtJUab0MGJ3C6q5kiEJs3pbyhSLnOKMyYOQehA0PBc=
github.com/rclone/go-proton-api v1.0.2/go.mod h1:LB2kCEaZMzNn3ocdz+qYfxXmuLxxN0ka62KJd2x53Bc=
github.com/rclone/gofakes3 v0.0.4 h1:LswpC49VY/UJ1zucoL5ktnOEX6lq3qK7e1aFIAfqCbk=