Include /usr/local too in the no-duplication of XDG_DATA_DIRS

@fix and improves the previous fix

(cherry picked from commit e0dcab584b)
Signed-off-by: Deon Thomas <PrinceAMD.Elive@gmail.com>
This commit is contained in:
Thanatermesis 2014-12-31 19:12:36 +01:00 committed by Deon Thomas
parent e3eda1d690
commit ae3410a0ba
1 changed files with 2 additions and 2 deletions

View File

@ -127,8 +127,8 @@ _xdg_data_dirs_augment(void)
s = getenv("XDG_DATA_DIRS");
// if our prefix is already /usr we should not append /usr/share here yet
if (strcmp(p, "/usr") == 0)
// don't add e_prefix path if it is already /usr or /usr/local
if ((strcmp(p, "/usr") == 0) || (strcmp(p, "/usr/local") == 0))
snprintf(newpath, sizeof(newpath), "%s", e_prefix_data_get());
else
snprintf(newpath, sizeof(newpath), "%s:%s/share", e_prefix_data_get(), p);