dropbox: Don't retry 461 errors - fixes #551
461 errors from dropbox indicate some sort of copyright violation.
This commit is contained in:
parent
606961f49d
commit
f3e00133a0
1 changed files with 7 additions and 0 deletions
|
@ -710,6 +710,13 @@ func (o *Object) Storable() bool {
|
||||||
// Open an object for read
|
// Open an object for read
|
||||||
func (o *Object) Open() (in io.ReadCloser, err error) {
|
func (o *Object) Open() (in io.ReadCloser, err error) {
|
||||||
in, _, err = o.fs.db.Download(o.remotePath(), "", 0)
|
in, _, err = o.fs.db.Download(o.remotePath(), "", 0)
|
||||||
|
if dropboxErr, ok := err.(*dropbox.Error); ok {
|
||||||
|
// Dropbox return 461 for copyright violation so don't
|
||||||
|
// attempt to retry this error
|
||||||
|
if dropboxErr.StatusCode == 461 {
|
||||||
|
return nil, fs.NoRetryError(err)
|
||||||
|
}
|
||||||
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue