From: Sangyoon Jang Date: Wed, 30 Sep 2015 10:26:37 +0000 (+0900) Subject: Check if the given package is accessible when install package X-Git-Tag: accepted/tizen/mobile/20151001.000020^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3b9f138d792f27e417bd906ab6a593fcbac1a88a;p=platform%2Fcore%2Fappfw%2Fslp-pkgmgr.git Check if the given package is accessible when install package Change-Id: I332bf6748549c78fd4c59b38dd34529fc1a45561 Signed-off-by: Sangyoon Jang --- diff --git a/client/src/pkgmgr.c b/client/src/pkgmgr.c index 01c2171..27df4dc 100644 --- a/client/src/pkgmgr.c +++ b/client/src/pkgmgr.c @@ -918,6 +918,11 @@ API int pkgmgr_client_usr_install(pkgmgr_client *pc, const char *pkg_type, return PKGMGR_R_EINVAL; } + if (access(pkg_path, F_OK) != 0) { + ERR("failed to access: %s", pkg_path); + return PKGMGR_R_EINVAL; + } + /* TODO: check pkg's type on server-side */ if (pkg_type == NULL) pkgtype = __get_type_from_path(pkg_path);