From: Alastair Poole Date: Thu, 3 Jan 2019 19:16:16 +0000 (+0000) Subject: efreet: Add installation prefix search for XDG_DATA_DIRS. X-Git-Tag: accepted/tizen/unified/20190111.055105~8 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6036355d0d04a9537a1b1a8a90f82bfdaa67c125;p=platform%2Fupstream%2Fefl.git efreet: Add installation prefix search for XDG_DATA_DIRS. Summary: Currently path parsed for XDG_DATA_DIRS is hard-coded to /etc. By using eina_prefix_get and adding to the list of directories efreet should use efreet will use path relative to the EFL installation. Reviewers: #committers, bu5hm4n, cedric, raster, zmike Reviewed By: #committers, zmike Subscribers: zmike, #reviewers Tags: #efl Differential Revision: https://phab.enlightenment.org/D7534 --- diff --git a/src/lib/efreet/efreet_base.c b/src/lib/efreet/efreet_base.c index 8b35285..e7bc54f 100644 --- a/src/lib/efreet/efreet_base.c +++ b/src/lib/efreet/efreet_base.c @@ -305,6 +305,16 @@ efreet_dirs_init(void) xdg_config_dirs = efreet_dirs_get("XDG_CONFIG_DIRS", getenv("APPDATA")); #else xdg_config_dirs = efreet_dirs_get("XDG_CONFIG_DIRS", "/etc/xdg"); + + Eina_Stringshare *path = eina_stringshare_printf("%s/xdg", PACKAGE_SYSCONF_DIR); + if ((!eina_list_data_find(xdg_config_dirs, path)) && ecore_file_exists(path)) + { + xdg_config_dirs = eina_list_append(xdg_config_dirs, path); + } + else + { + eina_stringshare_del(path); + } #endif /* xdg_runtime_dir */