forked from TrueCloudLab/rclone
s3: fix multipart upload uploading 0 length files
This regression was introduced by the recent re-write of the s3 multipart upload code.
This commit is contained in:
parent
ad2bb86d8c
commit
7242c7ce95
1 changed files with 1 additions and 1 deletions
|
@ -2127,7 +2127,7 @@ func (o *Object) uploadMultipart(ctx context.Context, req *s3.PutObjectInput, si
|
||||||
var n int
|
var n int
|
||||||
n, err = readers.ReadFill(in, buf) // this can never return 0, nil
|
n, err = readers.ReadFill(in, buf) // this can never return 0, nil
|
||||||
if err == io.EOF {
|
if err == io.EOF {
|
||||||
if n == 0 {
|
if n == 0 && partNum != 1 { // end if no data and if not first chunk
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
finished = true
|
finished = true
|
||||||
|
|
Loading…
Reference in a new issue