thanatermesis pushed a commit to branch enlightenment-0.17.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=58c0cfb666af941de6b91f9f9c20f11c5b62634b

commit 58c0cfb666af941de6b91f9f9c20f11c5b62634b
Author: Sebastian Dransfeld <[email protected]>
Date:   Wed Jun 11 11:18:54 2014 +0200

    e-xdg: augment XDG_CONFIG_DIRS as well
    
    Conflicts:
        src/bin/e_main.c
    
    Backported by Thanatermesis to E17
---
 src/bin/e_main.c | 22 ++++++++++++++++++++--
 1 file changed, 20 insertions(+), 2 deletions(-)

diff --git a/src/bin/e_main.c b/src/bin/e_main.c
index 833875c..cec4e22 100644
--- a/src/bin/e_main.c
+++ b/src/bin/e_main.c
@@ -132,12 +132,13 @@ EAPI Eina_Bool e_nopause = EINA_FALSE;
 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)
      {
@@ -153,6 +154,23 @@ _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);
+     }
+
+
    /* set menu prefix so we get our e menu */
    if (!getenv("XDG_MENU_PREFIX"))
      {

-- 


Reply via email to