forked from enlightenment/enlightenment
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 f42f5f1cfe
)
Signed-off-by: Deon Thomas <PrinceAMD.Elive@gmail.com>
This commit is contained in:
parent
1680de7ff2
commit
e3eda1d690
|
@ -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)))
|
||||
|
|
Loading…
Reference in New Issue