From b88b79d141d7e34e9ee137ef2c387f270acd7d44 Mon Sep 17 00:00:00 2001 From: John Chilton Date: Tue, 7 May 2024 17:41:15 -0400 Subject: [PATCH] Just delete on the prefix, not the whole container. --- lib/galaxy/objectstore/azure_blob.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/galaxy/objectstore/azure_blob.py b/lib/galaxy/objectstore/azure_blob.py index 7c9002a9e6ee..39e3c7490eb1 100644 --- a/lib/galaxy/objectstore/azure_blob.py +++ b/lib/galaxy/objectstore/azure_blob.py @@ -480,7 +480,7 @@ def _delete(self, obj, entire_dir=False, **kwargs): # but requires iterating through each individual blob in Azure and deleing it. if entire_dir and extra_dir: shutil.rmtree(self._get_cache_path(rel_path), ignore_errors=True) - blobs = self.service.get_container_client(self.container_name).list_blobs() + blobs = self.service.get_container_client(self.container_name).list_blobs(name_starts_with=rel_path) for blob in blobs: log.debug("Deleting from Azure: %s", blob) self._blob_client(blob.name).delete_blob()