pixeldrain: fix corrupted uploads after a retried upload error

When an upload failed with a retryable error the pacer retried the
whole PUT with the same input stream. The stream had already been
consumed by the first attempt so the retry uploaded an empty file.

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.
This commit is contained in:
Nick Craig-Wood
2026-09-05 12:14:46 +01:00
parent b940ce64c7
commit f4cd80a535
+1 -1
View File
@@ -213,7 +213,7 @@ func (f *Fs) put(
// exist yet // exist yet
params.Set("make_parents", "true") params.Set("make_parents", "true")
return node, f.pacer.Call(func() (bool, error) { return node, f.pacer.CallNoRetry(func() (bool, error) {
resp, err := f.srv.CallJSON( resp, err := f.srv.CallJSON(
ctx, ctx,
&rest.Opts{ &rest.Opts{