mirror of https://github.com/restic/restic.git
Pass buffer instead of byte slice
s3 library creates internal buffer pass in byte slice
This commit is contained in:
parent
12596c6841
commit
cf0531a2b1
|
@ -103,7 +103,7 @@ func (bb *s3Blob) Finalize(t backend.Type, name string) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
<-bb.b.connChan
|
<-bb.b.connChan
|
||||||
err = bb.b.bucket.Put(path, bb.buf.Bytes(), "binary/octet-stream", "private")
|
err = bb.b.bucket.PutReader(path, bb.buf, int64(bb.buf.Len()), "binary/octet-stream", "private")
|
||||||
bb.b.connChan <- struct{}{}
|
bb.b.connChan <- struct{}{}
|
||||||
bb.buf.Reset()
|
bb.buf.Reset()
|
||||||
return err
|
return err
|
||||||
|
|
Loading…
Reference in New Issue