summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSangyoon Jang <s89.jang@samsung.com>2016-03-16 06:11:29 (GMT)
committerSangyoon Jang <s89.jang@samsung.com>2016-03-16 06:14:09 (GMT)
commit6f744cd46a35ddf1b0e39ddabf3b350538bd7b13 (patch)
tree852955a7af952631d7b1a7d7f22641df45c13e2e
parentc048bc9706e1208d0889973bc424e1f323670316 (diff)
downloadui-gadget-1-accepted/tizen/common/20160316.160657.zip
ui-gadget-1-accepted/tizen/common/20160316.160657.tar.gz
ui-gadget-1-accepted/tizen/common/20160316.160657.tar.bz2
- Add missing path: <app_root>/lib/ug/<libname>.so Change-Id: I0271da54639c79d69208e6ffc461085880b0aeec Signed-off-by: Sangyoon Jang <s89.jang@samsung.com>
-rw-r--r--src/module.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/module.c b/src/module.c
index eecc9a8..2df10e2 100644
--- a/src/module.c
+++ b/src/module.c
@@ -142,7 +142,7 @@ static int __get_ug_info(const char *name, char **ug_file_path)
if (!__file_exist(ug_file))
goto out_func;
- /* get path using appid and root path */
+ /* get app root path */
if (pkgmgrinfo_appinfo_get_usr_appinfo(app_id, getuid(), &appinfo)) {
LOGE("failed to get app info");
return -1;
@@ -152,6 +152,16 @@ static int __get_ug_info(const char *name, char **ug_file_path)
pkgmgrinfo_appinfo_destroy_appinfo(appinfo);
return -1;
}
+ /* get path using name and root path.
+ * in this case, try to get ug app's library in the same pacakge.
+ */
+ snprintf(ug_file, PATH_MAX, "%s/lib/ug/libug-%s.so", root_path, name);
+ if (!__file_exist(ug_file))
+ goto out_func;
+ snprintf(ug_file, PATH_MAX, "%s/lib/ug/lib%s.so", root_path, name);
+ if (!__file_exist(ug_file))
+ goto out_func;
+ /* get path using appid and root path */
snprintf(ug_file, PATH_MAX, "%s/lib/ug/libug-%s.so", root_path, app_id);
if (!__file_exist(ug_file))
goto out_func;