mirror of
https://github.com/restic/restic.git
synced 2025-05-09 18:06:49 +00:00
azure: Adapt code to API change
This commit is contained in:
parent
9358a5fb37
commit
faa83db9e4
@ -228,7 +228,7 @@ func (be *Backend) saveSmall(ctx context.Context, objName string, rd restic.Rewi
|
|||||||
|
|
||||||
reader := bytes.NewReader(buf)
|
reader := bytes.NewReader(buf)
|
||||||
_, err = blockBlobClient.StageBlock(ctx, id, streaming.NopCloser(reader), &blockblob.StageBlockOptions{
|
_, err = blockBlobClient.StageBlock(ctx, id, streaming.NopCloser(reader), &blockblob.StageBlockOptions{
|
||||||
TransactionalContentMD5: rd.Hash(),
|
TransactionalValidation: blob.TransferValidationTypeMD5(rd.Hash()),
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return errors.Wrap(err, "StageBlock")
|
return errors.Wrap(err, "StageBlock")
|
||||||
@ -271,7 +271,7 @@ func (be *Backend) saveLarge(ctx context.Context, objName string, rd restic.Rewi
|
|||||||
reader := bytes.NewReader(buf)
|
reader := bytes.NewReader(buf)
|
||||||
debug.Log("StageBlock %v with %d bytes", id, len(buf))
|
debug.Log("StageBlock %v with %d bytes", id, len(buf))
|
||||||
_, err = blockBlobClient.StageBlock(ctx, id, streaming.NopCloser(reader), &blockblob.StageBlockOptions{
|
_, err = blockBlobClient.StageBlock(ctx, id, streaming.NopCloser(reader), &blockblob.StageBlockOptions{
|
||||||
TransactionalContentMD5: h[:],
|
TransactionalValidation: blob.TransferValidationTypeMD5(h[:]),
|
||||||
})
|
})
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user