Do not return error when original package directory doesn't exist.
In some case(such as recovery mode), original package directory may not
exist.
Change-Id: I48f7c79b684871c204418592e8461f2f1aa4d979
Signed-off-by: Sangyoon Jang <jeremy.jang@samsung.com>
bool CreateGlobalAppSymlinksForUser(const std::string& pkgid, uid_t uid) {
bf::path src_dir = bf::path(tzplatform_getenv(TZ_SYS_RW_APP)) / pkgid;
if (!bf::exists(src_dir)) {
- LOG(ERROR) << "src_dir not exists";
- return false;
+ LOG(WARNING) << "src_dir(" << src_dir << ") not exists";
+ return true;
}
tzplatform_set_user(uid);
bool DeleteGlobalAppSymlinksForAllUsers(const std::string& pkgid) {
bf::path src_dir = bf::path(tzplatform_getenv(TZ_SYS_RW_APP)) / pkgid;
if (!bf::exists(src_dir)) {
- LOG(ERROR) << "src_dir not exists";
- return false;
+ LOG(WARNING) << "src_dir(" << src_dir << ") not exists";
+ return true;
}
bool result = true;