mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-05-08 04:20:59 -05:00
Bump reva to latest main branch
For https://github.com/opencloud-eu/reva/pull/217
This commit is contained in:
+10
-2
@@ -290,13 +290,15 @@ type downloader struct {
|
||||
in *s3.GetObjectInput
|
||||
w io.WriterAt
|
||||
|
||||
wg sync.WaitGroup
|
||||
m sync.Mutex
|
||||
wg sync.WaitGroup
|
||||
m sync.Mutex
|
||||
once sync.Once
|
||||
|
||||
pos int64
|
||||
totalBytes int64
|
||||
written int64
|
||||
err error
|
||||
etag string
|
||||
|
||||
partBodyMaxRetries int
|
||||
}
|
||||
@@ -424,6 +426,9 @@ func (d *downloader) downloadChunk(chunk dlchunk) error {
|
||||
|
||||
// Get the next byte range of data
|
||||
in.Range = aws.String(chunk.ByteRange())
|
||||
if in.VersionId == nil && d.etag != "" {
|
||||
in.IfMatch = aws.String(d.etag)
|
||||
}
|
||||
|
||||
var n int64
|
||||
var err error
|
||||
@@ -466,6 +471,9 @@ func (d *downloader) tryDownloadChunk(in *s3.GetObjectInput, w io.Writer) (int64
|
||||
return 0, err
|
||||
}
|
||||
d.setTotalBytes(resp) // Set total if not yet set.
|
||||
d.once.Do(func() {
|
||||
d.etag = aws.StringValue(resp.ETag)
|
||||
})
|
||||
|
||||
var src io.Reader = resp.Body
|
||||
if d.cfg.BufferProvider != nil {
|
||||
|
||||
Reference in New Issue
Block a user