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
This commit is contained in:
parent
285fa87911
commit
f42f5f1cfe
|
@ -139,7 +139,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