From 98ec8686f29eed6b05420fe36fe737ca42054f4a Mon Sep 17 00:00:00 2001 From: PengZheng Date: Sat, 11 Jan 2025 21:13:22 +0800 Subject: [PATCH] gh-685: Remove archive root when bundle archive creation fails. --- libs/framework/src/celix_bundle_archive.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libs/framework/src/celix_bundle_archive.c b/libs/framework/src/celix_bundle_archive.c index b69e44496..671d139a0 100644 --- a/libs/framework/src/celix_bundle_archive.c +++ b/libs/framework/src/celix_bundle_archive.c @@ -305,6 +305,7 @@ celix_status_t celix_bundleArchive_create(celix_framework_t* fw, const char *arc status = celix_bundleArchive_storeBundleStateProperties(archive); if (status != CELIX_SUCCESS) { fw_logCode(fw->logger, CELIX_LOG_LEVEL_ERROR, status, "Failed to store bundle state properties."); + celix_utils_deleteDirectory(archive->archiveRoot, NULL); return status; } }