Skip to content

"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files

dropbox: Don't retry 461 errors - fixes #551

Nick Craig-Woodf3e00133a06b
diff --git a/dropbox/dropbox.go b/dropbox/dropbox.go
index 5fb323e98..76ae9239b 100644
--- a/dropbox/dropbox.go
+++ b/dropbox/dropbox.go
@@ -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
}