summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorj-h.choi <j-h.choi@samsung.com>2019-11-14 10:54:40 +0900
committer조웅석/Common Platform Lab(SR)/Principal Engineer/삼성전자 <ws77.cho@samsung.com>2019-11-19 14:45:36 +0900
commit42f6440f9ef4fe3441fea4f8426c2be02eaa398c (patch)
treee4a477878eed02d16ebdde46d8df02137c8d1a67
parent745aeb92e8e20cd8f4fd7a4a80905224e362af6c (diff)
downloadlauncher-42f6440f9ef4fe3441fea4f8426c2be02eaa398c.tar.gz
launcher-42f6440f9ef4fe3441fea4f8426c2be02eaa398c.tar.bz2
launcher-42f6440f9ef4fe3441fea4f8426c2be02eaa398c.zip
Fixed bug for TAC when upgrading application
-rw-r--r--NativeLauncher/installer-plugin/prefer_nuget_cache_plugin.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/NativeLauncher/installer-plugin/prefer_nuget_cache_plugin.cc b/NativeLauncher/installer-plugin/prefer_nuget_cache_plugin.cc
index 8d15f6b..f204e72 100644
--- a/NativeLauncher/installer-plugin/prefer_nuget_cache_plugin.cc
+++ b/NativeLauncher/installer-plugin/prefer_nuget_cache_plugin.cc
@@ -386,16 +386,16 @@ extern "C" int PKGMGR_MDPARSER_PLUGIN_UPGRADE(const char *pkgId, const char *app
return 0;
}
+ std::string sql = "SELECT * FROM TAC WHERE PKGID = '" + std::string(pkgId) + "';";
+ updateTac = dbSelect(tac_db, TAC_APP_LIST_DB, sql);
+
if (tacDB.empty()) {
- std::string sql = "DELETE FROM TAC WHERE PKGID = '" + std::string(pkgId) + "';";
+ sql = "DELETE FROM TAC WHERE PKGID = '" + std::string(pkgId) + "';";
dbDelete(tac_db, TAC_APP_LIST_DB, sql);
if (updateTacDB(tac_db) < 0) {
return -1;
}
} else {
- std::string sql = "SELECT * FROM TAC WHERE PKGID = '" + std::string(pkgId) + "';";
- updateTac = dbSelect(tac_db, TAC_APP_LIST_DB, sql);
-
for (auto& np : tacDB) {
std::string tac_name = np.substr(0, np.find('/'));
std::string tac_version = np.substr(np.rfind('/') + 1);