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;
}
}