From: Hwankyu Jhun Date: Sun, 13 Nov 2016 22:50:40 +0000 (+0900) Subject: Fix checking installed storage X-Git-Tag: accepted/tizen/3.0/common/20161115.184604^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F98%2F97298%2F2;p=platform%2Fcore%2Fappfw%2Fpkgmgr-info.git Fix checking installed storage - Use F_OK option instead of R_OK option Change-Id: Ic2960c710348657c017d84e2e5a721a383e2208e Signed-off-by: Hwankyu Jhun --- diff --git a/src/pkgmgrinfo_private.c b/src/pkgmgrinfo_private.c index 3c3c23a..4696af7 100644 --- a/src/pkgmgrinfo_private.c +++ b/src/pkgmgrinfo_private.c @@ -472,14 +472,17 @@ char *_get_system_locale(void) int __pkginfo_check_installed_storage(package_x *pkginfo) { char buf[MAX_QUERY_LEN] = {'\0'}; + int ret; + retvm_if(pkginfo->package == NULL, PMINFO_R_OK, "pkgid is NULL\n"); retvm_if(pkginfo->installed_storage == NULL, PMINFO_R_ERROR, "installed_storage is NULL\n"); if (strcmp(pkginfo->installed_storage, "installed_external") == 0) { snprintf(buf, MAX_QUERY_LEN - 1, "%s", pkginfo->external_path); - if (access(buf, R_OK) != 0) { - _LOGE("can not access [%s]", buf); + ret = access(buf, F_OK); + if (ret != 0) { + _LOGE("can not access [%s] - %d", buf, ret); return PMINFO_R_ERROR; } }