This is an automated email from the ASF dual-hosted git repository.

pengzheng pushed a commit to branch feature/522-support-uncompressed-bundle
in repository https://gitbox.apache.org/repos/asf/celix.git

commit 4863418f5fcb79277e42f5421a28ae0e72cc1675
Author: PengZheng <[email protected]>
AuthorDate: Sun Jun 25 18:11:37 2023 +0800

    Remove unnecessary directory creation in 
`celix_bundleArchive_createCacheDirectory`.
---
 libs/framework/gtest/config.properties.in                          | 2 +-
 .../gtest/src/BundleArchiveWithErrorInjectionTestSuite.cc          | 6 ------
 libs/framework/src/bundle_archive.c                                | 7 -------
 3 files changed, 1 insertion(+), 14 deletions(-)

diff --git a/libs/framework/gtest/config.properties.in 
b/libs/framework/gtest/config.properties.in
index 75bb7f4e..58f2098f 100644
--- a/libs/framework/gtest/config.properties.in
+++ b/libs/framework/gtest/config.properties.in
@@ -16,4 +16,4 @@
 # under the License.
 
 LOGHELPER_ENABLE_STDOUT_FALLBACK=true
-org.osgi.framework.storage.clean=onFirstInit
\ No newline at end of file
+org.osgi.framework.storage.clean=true
\ No newline at end of file
diff --git 
a/libs/framework/gtest/src/BundleArchiveWithErrorInjectionTestSuite.cc 
b/libs/framework/gtest/src/BundleArchiveWithErrorInjectionTestSuite.cc
index d0363d02..942b8e45 100644
--- a/libs/framework/gtest/src/BundleArchiveWithErrorInjectionTestSuite.cc
+++ b/libs/framework/gtest/src/BundleArchiveWithErrorInjectionTestSuite.cc
@@ -134,12 +134,6 @@ TEST_F(BundleArchiveWithErrorInjectionTestSuite, 
BundleArchiveCreateCacheDirecto
     
celix_ei_expect_celix_utils_createDirectory((void*)celix_bundleArchive_create, 
1, CELIX_FILE_IO_EXCEPTION, 2);
     installBundleAndExpectFailure();
 
-    teardownErrorInjectors();
-    // Given a mocked celix_utils_createDirectory which returns 
CELIX_FILE_IO_EXCEPTION from a third (indirect) call
-    //  from bundleArchive_create
-    
celix_ei_expect_celix_utils_createDirectory((void*)celix_bundleArchive_create, 
1, CELIX_FILE_IO_EXCEPTION, 3);
-    installBundleAndExpectFailure();
-
     teardownErrorInjectors();
     // Given a mocked celix_utils_strdup which returns NULL from a (indirect) 
call from bundleArchive_create
     celix_ei_expect_celix_utils_strdup((void*)celix_bundleArchive_create, 1, 
nullptr);
diff --git a/libs/framework/src/bundle_archive.c 
b/libs/framework/src/bundle_archive.c
index 818d03a6..e977fe6f 100644
--- a/libs/framework/src/bundle_archive.c
+++ b/libs/framework/src/bundle_archive.c
@@ -165,13 +165,6 @@ static celix_status_t 
celix_bundleArchive_createCacheDirectory(bundle_archive_pt
         return status;
     }
 
-    //create bundle revision directory
-    status = celix_utils_createDirectory(archive->resourceCacheRoot, false, 
&errorStr);
-    if (status != CELIX_SUCCESS) {
-        fw_log(archive->fw->logger, CELIX_LOG_LEVEL_ERROR, "Failed to 
initialize archive. Failed to create bundle revision dir: %s", errorStr);
-        return status;
-    }
-
     //extract bundle zip to revision directory
     status = celix_bundleArchive_extractBundle(archive, archive->location);
     if (status != CELIX_SUCCESS) {

Reply via email to