Fix the process substitution doesn't work with FONTCONFIG_FILE

Don't address the real filename when a named pipe is given in FONTCONFIG_FILE.
This commit is contained in:
Akira TAGOH 2020-02-19 14:02:31 +09:00
parent 452be8125f
commit 71d6866d38
1 changed files with 8 additions and 1 deletions

View File

@ -2466,12 +2466,19 @@ FcConfigRealFilename (FcConfig *config,
{
FcChar8 buf[FC_PATH_MAX];
ssize_t len;
struct stat sb;
if ((len = FcReadLink (n, buf, sizeof (buf) - 1)) != -1)
{
buf[len] = 0;
if (!FcStrIsAbsoluteFilename (buf))
/* We try to pick up a config from FONTCONFIG_FILE
* when url is null. don't try to address the real filename
* if it is a named pipe.
*/
if (!url && FcStat (n, &sb) == 0 && S_ISFIFO (sb.st_mode))
return n;
else if (!FcStrIsAbsoluteFilename (buf))
{
FcChar8 *dirname = FcStrDirname (n);
FcStrFree (n);