mirror of
https://github.com/rclone/rclone
synced 2024-11-11 09:30:44 +01:00
drive: Add "Forbidden to download" message for files with no downloadURL - fixes #95
This commit is contained in:
parent
e2f4d7b5e3
commit
88ea8b305d
@ -962,6 +962,9 @@ func (o *FsObjectDrive) Storable() bool {
|
||||
|
||||
// Open an object for read
|
||||
func (o *FsObjectDrive) Open() (in io.ReadCloser, err error) {
|
||||
if o.url == "" {
|
||||
return nil, fmt.Errorf("Forbidden to download - check sharing permission")
|
||||
}
|
||||
req, err := http.NewRequest("GET", o.url, nil)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
Loading…
Reference in New Issue
Block a user