Replace the path of subdirs in caches as well
This commit is contained in:
parent
6d3b306cbe
commit
cf5acaed96
22
src/fccfg.c
22
src/fccfg.c
|
@ -370,9 +370,29 @@ FcConfigAddCache (FcConfig *config, FcCache *cache,
|
|||
{
|
||||
for (i = 0; i < cache->dirs_count; i++)
|
||||
{
|
||||
FcChar8 *dir = FcOffsetToPtr (dirs, dirs[i], FcChar8);
|
||||
const FcChar8 *dir = FcCacheSubdir (cache, i);
|
||||
FcChar8 *s = NULL;
|
||||
struct stat statb;
|
||||
|
||||
if (FcStat (dir, &statb) < 0)
|
||||
{
|
||||
const FcChar8 *alias;
|
||||
FcChar8 *d = FcStrDirname (dir);
|
||||
|
||||
if ((alias = FcDirCacheFindAliasPath (dir)))
|
||||
dir = alias;
|
||||
else if ((alias = FcDirCacheFindAliasPath (d)))
|
||||
{
|
||||
FcChar8 *base = FcStrBasename (dir);
|
||||
dir = s = FcStrBuildFilename (alias, base, NULL);
|
||||
FcStrFree (base);
|
||||
}
|
||||
FcStrFree (d);
|
||||
}
|
||||
if (FcConfigAcceptFilename (config, dir))
|
||||
FcStrSetAddFilename (dirSet, dir);
|
||||
if (s)
|
||||
FcStrFree (s);
|
||||
}
|
||||
}
|
||||
return FcTrue;
|
||||
|
|
Loading…
Reference in New Issue