mirror of
https://github.com/rclone/rclone.git
synced 2026-02-10 21:50:00 +00:00
filen: fix potential panic in case of error during upload
This commit is contained in:
committed by
Nick Craig-Wood
parent
ed5bd327c0
commit
88b484722a
@@ -415,13 +415,13 @@ func (cw *chunkWriter) WriteChunk(ctx context.Context, chunkNumber int, reader i
|
||||
return totalWritten, err
|
||||
}
|
||||
resp, err := cw.filen.UploadChunk(ctx, &cw.FileUpload, realChunkNumber, chunkReadSlice)
|
||||
if err != nil {
|
||||
return totalWritten, err
|
||||
}
|
||||
select { // only care about getting this once
|
||||
case cw.bucketAndRegion <- *resp:
|
||||
default:
|
||||
}
|
||||
if err != nil {
|
||||
return totalWritten, err
|
||||
}
|
||||
totalWritten += int64(len(chunkReadSlice))
|
||||
realChunkNumber++
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user