"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files
Go azure-blobazure-blob-storageazure-filesbackblaze-b2cloud-storagedropboxencryptionftpfuse-filesystemgogolanggoogle-cloud-storagegoogle-driveonedriveopenstack-swiftrclones3sftpsyncwebdav
onedrive: Do not retry on 400 pathIsTooLong
ctrl-q7b1428a498ce
diff --git a/backend/onedrive/onedrive.go b/backend/onedrive/onedrive.goindex 8052b33a1..3fc06b54b 100644--- a/backend/onedrive/onedrive.go+++ b/backend/onedrive/onedrive.go@@ -649,6 +649,12 @@ func shouldRetry(ctx context.Context, resp *http.Response, err error) (bool, errretry := falseif resp != nil {switch resp.StatusCode {+ case 400:+ if apiErr, ok := err.(*api.Error); ok {+ if apiErr.ErrorInfo.InnerError.Code == "pathIsTooLong" {+ return false, fserrors.NoRetryError(err)+ }+ }case 401:if len(resp.Header["Www-Authenticate"]) == 1 && strings.Index(resp.Header["Www-Authenticate"][0], "expired_token") >= 0 {retry = true