mirror of
https://github.com/rclone/rclone.git
synced 2026-09-16 16:37:16 -04:00
When an upload failed part way through with a retryable error (eg a 502 from the block storage servers) the pacer retried the whole upload call with the same input stream. The stream had already been partially consumed, so the retry re-created the upload draft and committed just the remainder of the stream as a complete file, silently truncating it. With restic over serve restic this corrupted the repository as the truncated pack was reported as successfully uploaded. This fixes it by using CallNoRetry for the upload, as the other backends do, so retryable errors are returned wrapped in a RetryError for the caller to retry the upload with a fresh stream.