mirror of
https://github.com/rclone/rclone.git
synced 2024-11-23 00:43:49 +01:00
dropbox: treat insufficient_space errors as non retriable errors
Before this change rclone would keep trying to upload files after dropbox had signalled it was full. This change makes the relevant error a non-retriable error. See: https://forum.rclone.org/t/why-does-a-file-transfer-continue-when-there-is-no-available-storage/13677
This commit is contained in:
parent
c789436580
commit
4b9da601be
@ -1123,6 +1123,13 @@ func (o *Object) uploadChunked(in0 io.Reader, commitInfo *files.CommitInfo, size
|
||||
return false, nil
|
||||
}
|
||||
entry, err = o.fs.srv.UploadSessionFinish(args, chunk)
|
||||
// If error is insufficient space then don't retry
|
||||
if e, ok := err.(files.UploadSessionFinishAPIError); ok {
|
||||
if e.EndpointError != nil && e.EndpointError.Path != nil && e.EndpointError.Path.Tag == files.WriteErrorInsufficientSpace {
|
||||
err = fserrors.NoRetryError(err)
|
||||
return false, err
|
||||
}
|
||||
}
|
||||
// after the first chunk is uploaded, we retry everything
|
||||
return err != nil, err
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user