From 8cfcddaa9435665085f2fc9ed075bae0640c2cc1 Mon Sep 17 00:00:00 2001 From: "j-h.choi" Date: Fri, 21 Aug 2020 10:54:41 +0900 Subject: [PATCH] Wrap bf::exists() to check for exception Change-Id: I0facee498025112514ea16416052d148eaccb04c --- NativeLauncher/installer-plugin/delete_unused_library_plugin.cc | 2 +- NativeLauncher/installer-plugin/prefer_nuget_cache_plugin.cc | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) 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); -- 2.7.4