mirror of
https://github.com/rclone/rclone.git
synced 2025-01-13 20:38:12 +02:00
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
@ -710,6 +710,13 @@ func (o *Object) Storable() bool {
|
||||
// Open an object for read
|
||||
func (o *Object) Open() (in io.ReadCloser, err error) {
|
||||
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
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user