mirror of
https://github.com/rclone/rclone.git
synced 2025-03-28 12:42:08 +02: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
|
// Open an object for read
|
||||||
func (o *FsObjectDrive) Open() (in io.ReadCloser, err error) {
|
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)
|
req, err := http.NewRequest("GET", o.url, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
Loading…
x
Reference in New Issue
Block a user