princeamd pushed a commit to branch master.

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

commit e3eda1d690240e3754432ebba540114479e721ed
Author: Thanatermesis <thanaterme...@gmail.com>
Date:   Tue Dec 23 16:53:02 2014 +0100

    Do not add /usr/share twice for XDG_DATA_DIRS
    
    This commit @fix a duplicated entry in XDG_DATA_DIRS which is also
    added prematurely, if eina_prefix_get is already /usr (most of the
    times) we dont want to add it here
    
    (cherry picked from commit f42f5f1cfedcecee702e82398068798bdfcb2d99)
    Signed-off-by: Deon Thomas <princeamd.el...@gmail.com>
---
 src/bin/e_main.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/src/bin/e_main.c b/src/bin/e_main.c
index 733219d..27eabb7 100644
--- a/src/bin/e_main.c
+++ b/src/bin/e_main.c
@@ -126,7 +126,13 @@ _xdg_data_dirs_augment(void)
    if (!p) return;
 
    s = getenv("XDG_DATA_DIRS");
-   snprintf(newpath, sizeof(newpath), "%s:%s/share", e_prefix_data_get(), p);
+
+   // if our prefix is already /usr we should not append /usr/share here yet
+   if (strcmp(p, "/usr") == 0)
+     snprintf(newpath, sizeof(newpath), "%s", e_prefix_data_get());
+   else
+     snprintf(newpath, sizeof(newpath), "%s:%s/share", e_prefix_data_get(), p);
+
    if (s)
      {
         if (strncmp(s, newpath, strlen(newpath)))

-- 


Reply via email to