summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Dransfeld <sd@tango.flipp.net>2014-06-11 11:18:54 +0200
committerSebastian Dransfeld <sd@tango.flipp.net>2014-06-11 11:18:54 +0200
commit2247fab47294a12feb0d835e11ec8d26518d417c (patch)
treed55f12b412ac52e8c78e55584e16887781444ef4
parentedf3f90ca342bd81ea21cadea605d5b97d0c6c32 (diff)
downloadenlightenment-2247fab47294a12feb0d835e11ec8d26518d417c.tar.gz
e-xdg: augment XDG_CONFIG_DIRS as well
-rw-r--r--src/bin/e_main.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/src/bin/e_main.c b/src/bin/e_main.c
index 40bea9b7eb..8cbd2b870d 100644
--- a/src/bin/e_main.c
+++ b/src/bin/e_main.c
@@ -119,12 +119,13 @@ EINTERN double e_first_frame_start_time = -1;
static void
_xdg_data_dirs_augment(void)
{
- const char *s = getenv("XDG_DATA_DIRS");
+ const char *s;
const char *p = e_prefix_get();
char newpath[4096], buf[4096];
if (!p) return;
+ s = getenv("XDG_DATA_DIRS");
snprintf(newpath, sizeof(newpath), "%s:%s/share", e_prefix_data_get(), p);
if (s)
{
@@ -140,6 +141,22 @@ _xdg_data_dirs_augment(void)
e_util_env_set("XDG_DATA_DIRS", buf);
}
+ s = getenv("XDG_CONFIG_DIRS");
+ snprintf(newpath, sizeof(newpath), "%s/etc/xdg", p);
+ if (s)
+ {
+ if (strncmp(s, newpath, strlen(newpath)))
+ {
+ snprintf(buf, sizeof(buf), "%s:%s", newpath, s);
+ e_util_env_set("XDG_CONFIG_DIRS", buf);
+ }
+ }
+ else
+ {
+ snprintf(buf, sizeof(buf), "%s:/etc/xdg", newpath);
+ e_util_env_set("XDG_CONFIG_DIRS", buf);
+ }
+
if (!getenv("XDG_RUNTIME_DIR"))
{
const char *dir;