mirror of
https://codeberg.org/kiss-community/repo
synced 2024-08-24 23:06:19 +00:00
42 lines
1.3 KiB
Diff
42 lines
1.3 KiB
Diff
From fcada522913e5e07efa6367eff87ace9f06d24c8 Mon Sep 17 00:00:00 2001
|
|
From: Akira TAGOH <akira@tagoh.org>
|
|
Date: Wed, 28 Aug 2019 17:46:03 +0900
|
|
Subject: [PATCH] Do not return FcFalse from FcConfigParseAndLoad*() if
|
|
complain is set to false
|
|
|
|
https://bugzilla.redhat.com/show_bug.cgi?id=1744377
|
|
---
|
|
diff --git a/src/fcxml.c b/src/fcxml.c
|
|
index 2e26e77a..076fa301 100644
|
|
--- a/src/fcxml.c
|
|
+++ b/src/fcxml.c
|
|
@@ -3526,7 +3526,7 @@ _FcConfigParse (FcConfig *config,
|
|
int len;
|
|
FcStrBuf sbuf;
|
|
char buf[BUFSIZ];
|
|
- FcBool ret = FcFalse;
|
|
+ FcBool ret = FcFalse, complain_again = complain;
|
|
|
|
#ifdef _WIN32
|
|
if (!pGetSystemWindowsDirectory)
|
|
@@ -3605,7 +3605,7 @@ _FcConfigParse (FcConfig *config,
|
|
close (fd);
|
|
|
|
ret = FcConfigParseAndLoadFromMemoryInternal (config, filename, FcStrBufDoneStatic (&sbuf), complain, load);
|
|
- complain = FcFalse; /* no need to reclaim here */
|
|
+ complain_again = FcFalse; /* no need to reclaim here */
|
|
bail1:
|
|
FcStrBufDestroy (&sbuf);
|
|
bail0:
|
|
@@ -3613,7 +3613,9 @@ bail0:
|
|
FcStrFree (filename);
|
|
if (realfilename)
|
|
FcStrFree (realfilename);
|
|
- if (!ret && complain)
|
|
+ if (!complain)
|
|
+ return FcTrue;
|
|
+ if (!ret && complain_again)
|
|
{
|
|
if (name)
|
|
FcConfigMessage (0, FcSevereError, "Cannot %s config file \"%s\"", load ? "load" : "scan", name);
|