putio: fix panic on Object.Open #4315

This commit is contained in:
Cenk Alti
2020-06-10 12:16:09 +01:00
committed by Nick Craig-Wood
parent b2ded6212b
commit 16422a6b78
+4 -1
View File
@@ -248,7 +248,10 @@ func (o *Object) Open(ctx context.Context, options ...fs.OpenOption) (in io.Read
_ = resp.Body.Close() _ = resp.Body.Close()
return nil, fserrors.NoRetryError(err) return nil, fserrors.NoRetryError(err)
} }
return resp.Body, err if err != nil {
return nil, err
}
return resp.Body, nil
} }
// Update the already existing object // Update the already existing object