From e3eda1d690240e3754432ebba540114479e721ed Mon Sep 17 00:00:00 2001 From: Thanatermesis Date: Tue, 23 Dec 2014 16:53:02 +0100 Subject: [PATCH] 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 --- 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 733219d98..27eabb7bb 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)))