Don't call FcStat when the alias has already been added
We could assume that the targeted location is mapped at the different place when there are in the alias table.
This commit is contained in:
parent
cf5acaed96
commit
d7133f4ed7
11
src/fccfg.c
11
src/fccfg.c
|
@ -371,24 +371,17 @@ FcConfigAddCache (FcConfig *config, FcCache *cache,
|
|||
for (i = 0; i < cache->dirs_count; i++)
|
||||
{
|
||||
const FcChar8 *dir = FcCacheSubdir (cache, i);
|
||||
FcChar8 *s = NULL;
|
||||
struct stat statb;
|
||||
|
||||
if (FcStat (dir, &statb) < 0)
|
||||
{
|
||||
const FcChar8 *alias;
|
||||
FcChar8 *d = FcStrDirname (dir);
|
||||
FcChar8 *s = NULL;
|
||||
|
||||
if ((alias = FcDirCacheFindAliasPath (dir)))
|
||||
dir = alias;
|
||||
else if ((alias = FcDirCacheFindAliasPath (d)))
|
||||
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)
|
||||
|
|
Loading…
Reference in New Issue