1
0
mirror of https://github.com/rclone/rclone.git synced 2025-12-06 00:03:32 +00:00

operations: fix call fmt.Errorf with wrong err

This commit is contained in:
alingse
2025-04-04 22:21:45 +08:00
committed by Nick Craig-Wood
parent 46dcc0eaf6
commit f76c72b5cc

View File

@@ -315,8 +315,8 @@ func (w *writerAtChunkWriter) WriteChunk(ctx context.Context, chunkNumber int, r
// if we were buffering, flush to disk // if we were buffering, flush to disk
switch w := writer.(type) { switch w := writer.(type) {
case *bufio.Writer: case *bufio.Writer:
er2 := w.Flush() err = w.Flush()
if er2 != nil { if err != nil {
return -1, fmt.Errorf("multi-thread copy: flush failed: %w", err) return -1, fmt.Errorf("multi-thread copy: flush failed: %w", err)
} }
} }