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

putio: fix panic on Object.Open #4315

Cenk Alti16422a6b780c
diff --git a/backend/putio/object.go b/backend/putio/object.go
index 27723532b..09ddcf844 100644
--- a/backend/putio/object.go
+++ b/backend/putio/object.go
@@ -248,7 +248,10 @@ func (o *Object) Open(ctx context.Context, options ...fs.OpenOption) (in io.Read
_ = resp.Body.Close()
return nil, fserrors.NoRetryError(err)
}
- return resp.Body, err
+ if err != nil {
+ return nil, err
+ }
+ return resp.Body, nil
}
// Update the already existing object