mirror of
https://github.com/rclone/rclone.git
synced 2024-11-23 02:56:25 +08:00
drive: check errors in Open() better
This commit is contained in:
parent
c1a245d1c8
commit
66cf2df780
|
@ -929,7 +929,10 @@ func (o *FsObjectDrive) Storable() bool {
|
|||
|
||||
// Open an object for read
|
||||
func (o *FsObjectDrive) Open() (in io.ReadCloser, err error) {
|
||||
req, _ := http.NewRequest("GET", o.url, nil)
|
||||
req, err := http.NewRequest("GET", o.url, nil)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
req.Header.Set("User-Agent", fs.UserAgent)
|
||||
res, err := o.drive.client.Do(req)
|
||||
if err != nil {
|
||||
|
|
Loading…
Reference in New Issue
Block a user