aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlastair Poole <netstar@gmail.com>2019-01-03 19:16:16 +0000
committerAlastair Poole <netstar@gmail.com>2019-01-03 19:16:31 +0000
commit0d7f20bbc63da62bbd7af9ae92c38ecc034ec213 (patch)
tree4e3594922c82ff7cdb17783e34e9ef8e9c457430
parentmeson: warn on unused parameters like on autotools (diff)
downloadefl-0d7f20bbc63da62bbd7af9ae92c38ecc034ec213.tar.gz
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
-rw-r--r--src/lib/efreet/efreet_base.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/lib/efreet/efreet_base.c b/src/lib/efreet/efreet_base.c
index 8b35285148..e7bc54f118 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 */