1
0
Fork 0
mirror of https://github.com/restic/restic.git synced 2024-12-25 01:06:39 +00:00

Pass buffer instead of byte slice

s3 library creates internal buffer pass in byte slice
This commit is contained in:
Chris Howey 2015-06-14 09:05:20 -05:00
parent 12596c6841
commit cf0531a2b1

View file

@ -103,7 +103,7 @@ func (bb *s3Blob) Finalize(t backend.Type, name string) error {
}
<-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.buf.Reset()
return err