Fix scoutfs backend s3 upload with non-aligned size.

This commit is contained in:
Ondrej Palkovsky
2025-08-28 12:44:53 +02:00
parent 13ea2286f7
commit c93d2cd1f2
+3 -1
View File
@@ -1561,7 +1561,9 @@ func (p *Posix) CompleteMultipartUploadWithCopy(ctx context.Context, input *s3.C
if err != nil {
// Fail back to standard copy
debuglogger.Logf("Custom data block move failed (%w), failing back to io.Copy()", err)
_, err = io.Copy(f.File(), rdr)
fw := f.File()
fw.Seek(0, io.SeekEnd)
_, err = io.Copy(fw, rdr)
}
} else {
_, err = io.Copy(f.File(), rdr)