libpkgconf: path: use pkgconf_path_relocate() when matching paths

feature/tap-sh
William Pitcock 2017-01-19 10:43:23 -06:00
parent fa927fd379
commit 1ee3c12f53
1 changed files with 7 additions and 1 deletions

View File

@ -189,12 +189,18 @@ bool
pkgconf_path_match_list(const char *path, const pkgconf_list_t *dirlist)
{
pkgconf_node_t *n = NULL;
char relocated[PKGCONF_BUFSIZE];
const char *cpath = path;
pkgconf_strlcpy(relocated, path, sizeof relocated);
if (pkgconf_path_relocate(relocated, sizeof relocated))
cpath = path;
PKGCONF_FOREACH_LIST_ENTRY(dirlist->head, n)
{
pkgconf_path_t *pnode = n->data;
if (!strcmp(pnode->path, path))
if (!strcmp(pnode->path, cpath))
return true;
}