Skip to content

Commit

Permalink
Fix deleting builds (#34)
Browse files Browse the repository at this point in the history
  • Loading branch information
timja authored Jul 26, 2022
1 parent e250f8d commit 7989b9c
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import com.azure.storage.blob.BlobUrlParts;
import com.azure.storage.blob.models.BlobHttpHeaders;
import com.azure.storage.blob.models.BlobItem;
import com.azure.storage.blob.models.ListBlobsOptions;
import com.azure.storage.blob.options.BlobUploadFromFileOptions;
import com.azure.storage.blob.sas.BlobSasPermission;
import com.azure.storage.blob.sas.BlobServiceSasSignatureValues;
Expand Down Expand Up @@ -352,7 +353,8 @@ public boolean delete() throws IOException, InterruptedException {

private int deleteWithPrefix(String prefix) throws IOException, URISyntaxException, InterruptedException {
BlobContainerClient container = getContainer();
PagedIterable<BlobItem> listBlobItems = container.listBlobsByHierarchy(prefix);
ListBlobsOptions listBlobsOptions = new ListBlobsOptions().setPrefix(prefix);
PagedIterable<BlobItem> listBlobItems = container.listBlobs(listBlobsOptions, null);
return deleteBlobs(container, listBlobItems);
}

Expand Down

0 comments on commit 7989b9c

Please sign in to comment.