From 16422a6b780c20f519c2490767fb5570589a91c3 Mon Sep 17 00:00:00 2001 From: Cenk Alti Date: Mon, 8 Jun 2020 23:13:41 +0300 Subject: [PATCH] putio: fix panic on Object.Open #4315 --- backend/putio/object.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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