forked from TrueCloudLab/restic
azure: Adapt code to API change
This commit is contained in:
parent
9358a5fb37
commit
faa83db9e4
1 changed files with 2 additions and 2 deletions
|
@ -228,7 +228,7 @@ func (be *Backend) saveSmall(ctx context.Context, objName string, rd restic.Rewi
|
|||
|
||||
reader := bytes.NewReader(buf)
|
||||
_, err = blockBlobClient.StageBlock(ctx, id, streaming.NopCloser(reader), &blockblob.StageBlockOptions{
|
||||
TransactionalContentMD5: rd.Hash(),
|
||||
TransactionalValidation: blob.TransferValidationTypeMD5(rd.Hash()),
|
||||
})
|
||||
if err != nil {
|
||||
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)
|
||||
debug.Log("StageBlock %v with %d bytes", id, len(buf))
|
||||
_, err = blockBlobClient.StageBlock(ctx, id, streaming.NopCloser(reader), &blockblob.StageBlockOptions{
|
||||
TransactionalContentMD5: h[:],
|
||||
TransactionalValidation: blob.TransferValidationTypeMD5(h[:]),
|
||||
})
|
||||
|
||||
if err != nil {
|
||||
|
|
Loading…
Reference in a new issue