From 6f744cd46a35ddf1b0e39ddabf3b350538bd7b13 Mon Sep 17 00:00:00 2001 From: Sangyoon Jang Date: Wed, 16 Mar 2016 15:11:29 +0900 Subject: Add missing path to resolving ug library - Add missing path: /lib/ug/.so Change-Id: I0271da54639c79d69208e6ffc461085880b0aeec Signed-off-by: Sangyoon Jang --- src/module.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) 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; -- cgit v1.2.3