Wrap bf::exists() to check for exception submit/tizen/20200828.012148
authorj-h.choi <j-h.choi@samsung.com>
Fri, 21 Aug 2020 01:54:41 +0000 (10:54 +0900)
committer조웅석/Common Platform Lab(SR)/Principal Engineer/삼성전자 <ws77.cho@samsung.com>
Mon, 24 Aug 2020 00:38:22 +0000 (09:38 +0900)
Change-Id: I0facee498025112514ea16416052d148eaccb04c

NativeLauncher/installer-plugin/delete_unused_library_plugin.cc
NativeLauncher/installer-plugin/prefer_nuget_cache_plugin.cc

index d016f89..1e2fdbd 100644 (file)
@@ -56,7 +56,7 @@ extern "C" int PKGMGR_PARSER_PLUGIN_INSTALL(xmlDocPtr doc, const char* pkgId)
        }
 
        std::string runtimesDir = concatPath(rootPath, "bin/runtimes");
-       if (!bf::exists(runtimesDir)) {
+       if (!exist(runtimesDir)) {
                return 0;
        }
 
index dbdae36..30c16a8 100644 (file)
@@ -284,7 +284,7 @@ extern "C" int PKGMGR_MDPARSER_PLUGIN_INSTALL(const char *pkgId, const char *app
                                return -1;
                        }
 
-                       if (!bf::exists(sha256_info)) {
+                       if (!exist(sha256_info)) {
                                status = "restore";
                                return -1;
                        }
@@ -530,7 +530,7 @@ extern "C" int PKGMGR_MDPARSER_PLUGIN_UPGRADE(const char *pkgId, const char *app
                                        return -1;
                                }
 
-                               if (!bf::exists(sha256_info)) {
+                               if (!exist(sha256_info)) {
                                        status = "restore";
                                        return -1;
                                }
@@ -900,7 +900,7 @@ void cleanStep(std::string tac)
                bool isExist = false;
                for (auto& bck : bf::recursive_directory_iterator(current_tac)) {
                        std::string bck_path = bck.path().string();
-                       if (bf::exists(bck_path) && bf::is_directory(bck_path) && strstr(bck_path.c_str(), ".bck") == NULL) {
+                       if (exist(bck_path) && bf::is_directory(bck_path) && strstr(bck_path.c_str(), ".bck") == NULL) {
                                isExist = true;
                                break;
                        }
@@ -961,7 +961,7 @@ extern "C" int PKGMGR_MDPARSER_PLUGIN_CLEAN(const char *pkgId, const char *appId
                }
 
                std::string runtimesDir = concatPath(rootPath, "bin/runtimes");
-               if (bf::exists(runtimesDir)) {
+               if (exist(runtimesDir)) {
                        char buffer[128];
                        sprintf(buffer, "(tizen|linux|unix|base|any)(.\\d.\\d.\\d)?(-%s)?", ARCHITECTURE_IDENTIFIER);
                        std::regex pattern(buffer);