From: j-h.choi Date: Fri, 21 Aug 2020 01:54:41 +0000 (+0900) Subject: Wrap bf::exists() to check for exception X-Git-Tag: submit/tizen/20200828.012148^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8cfcddaa9435665085f2fc9ed075bae0640c2cc1;p=platform%2Fcore%2Fdotnet%2Flauncher.git Wrap bf::exists() to check for exception Change-Id: I0facee498025112514ea16416052d148eaccb04c --- diff --git a/NativeLauncher/installer-plugin/delete_unused_library_plugin.cc b/NativeLauncher/installer-plugin/delete_unused_library_plugin.cc index d016f89..1e2fdbd 100644 --- a/NativeLauncher/installer-plugin/delete_unused_library_plugin.cc +++ b/NativeLauncher/installer-plugin/delete_unused_library_plugin.cc @@ -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; } diff --git a/NativeLauncher/installer-plugin/prefer_nuget_cache_plugin.cc b/NativeLauncher/installer-plugin/prefer_nuget_cache_plugin.cc index dbdae36..30c16a8 100644 --- a/NativeLauncher/installer-plugin/prefer_nuget_cache_plugin.cc +++ b/NativeLauncher/installer-plugin/prefer_nuget_cache_plugin.cc @@ -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);