fix (plg_backend_azure): remove things

This commit is contained in:
MickaelK 2024-10-06 08:05:19 +11:00
parent 4cd3611251
commit 963bac5146

View file

@ -218,6 +218,7 @@ func (this *AzureBlob) Rm(path string) error {
}
pager := this.client.NewListBlobsFlatPager(ap.containerName, &container.ListBlobsFlatOptions{
Include: container.ListBlobsInclude{Snapshots: true, Versions: true},
Prefix: &ap.blobName,
})
for pager.More() {
resp, err := pager.NextPage(this.ctx)
@ -225,7 +226,7 @@ func (this *AzureBlob) Rm(path string) error {
return err
}
for _, blob := range resp.Segment.BlobItems {
_, err := this.client.DeleteBlob(this.ctx, ap.containerName, *blob.Name, nil)
_, err := this.client.DeleteBlob(context.Background(), ap.containerName, *blob.Name, nil)
if err != nil {
return err
}