diff options
author | Ilho Kim <ilho159.kim@samsung.com> | 2024-11-15 15:53:29 +0900 |
---|---|---|
committer | Ilho Kim <ilho159.kim@samsung.com> | 2024-11-15 15:53:29 +0900 |
commit | 62505b04eaed5a9bbf155a7a8326a9dcd3c49528 (patch) | |
tree | 14091cecd097c4bcbc101897f3e6b0786f30779d | |
parent | 37930c4607352e3c95f614dd5da89dff684d003a (diff) | |
download | app-installers-62505b04eaed5a9bbf155a7a8326a9dcd3c49528.tar.gz app-installers-62505b04eaed5a9bbf155a7a8326a9dcd3c49528.tar.bz2 app-installers-62505b04eaed5a9bbf155a7a8326a9dcd3c49528.zip |
Fix OfflineRemove in StepRemovePrivSharedres
Change-Id: Ib9acc695d5d931b7bdebe9d2d5812ebe565304bc
Signed-off-by: Ilho Kim <ilho159.kim@samsung.com>
-rw-r--r-- | src/common/step/pkgmgr/step_remove_priv_sharedres.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/common/step/pkgmgr/step_remove_priv_sharedres.cc b/src/common/step/pkgmgr/step_remove_priv_sharedres.cc index ed596900..8c7623bc 100644 --- a/src/common/step/pkgmgr/step_remove_priv_sharedres.cc +++ b/src/common/step/pkgmgr/step_remove_priv_sharedres.cc @@ -16,6 +16,8 @@ namespace fs = std::filesystem; namespace { +constexpr char kPrivSharedRes[] = "priv_shared_res"; + fs::path GetRootPathForUid(uid_t uid) { tzplatform_set_user(uid); const char* rootpath = tzplatform_getenv(TZ_USER_HOME); @@ -24,9 +26,9 @@ fs::path GetRootPathForUid(uid_t uid) { } bool RemoveResForUid(const std::string& pkgid, uid_t uid) { - fs::path target_path = GetRootPathForUid(uid) / pkgid; + fs::path target_path = GetRootPathForUid(uid) / kPrivSharedRes / pkgid; - if (fs::exists(target_path)) + if (!fs::exists(target_path)) return true; if (!common_installer::RemoveAll(target_path)) |