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

@fix and improves the previous fix
This commit is contained in:
Thanatermesis 2014-12-31 19:12:36 +01:00
parent f42f5f1cfe
commit e0dcab584b
1 changed files with 2 additions and 2 deletions

View File

@ -140,8 +140,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);