加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
42b12fc7c0855cddecdf6f4a0a26b897d53432a5.patch 1.84 KB
一键复制 编辑 原始数据 按行查看 历史
ocs-bot 提交于 2024-12-25 14:05 . - Apply patches from rpm-tracker
From 42b12fc7c0855cddecdf6f4a0a26b897d53432a5 Mon Sep 17 00:00:00 2001
From: Akira TAGOH <akira@tagoh.org>
Date: Mon, 22 Apr 2024 22:51:15 +0900
Subject: [PATCH] More information when no writable cache directories
Show cache directories fontconfig tries to test on loading
to see where was no writable access.
Fixes https://gitlab.freedesktop.org/fontconfig/fontconfig/-/issues/413
---
src/fccache.c | 23 ++++++++++++++++++++++-
1 file changed, 22 insertions(+), 1 deletion(-)
diff --git a/src/fccache.c b/src/fccache.c
index 54f76ac1..e0dc4c95 100644
--- a/src/fccache.c
+++ b/src/fccache.c
@@ -1358,14 +1358,21 @@ FcDirCacheWrite (FcCache *cache, FcConfig *config)
unsigned int magic;
int written;
const FcChar8 *sysroot = FcConfigGetSysRoot (config);
+ FcStrSet *cpath;
/*
* Write it to the first directory in the list which is writable
*/
+ cpath = FcStrSetCreateEx (FCSS_GROW_BY_64);
+ if (!cpath)
+ return FcFalse;
list = FcStrListCreate (config->cacheDirs);
if (!list)
+ {
+ FcStrSetDestroy (cpath);
return FcFalse;
+ }
while ((test_dir = FcStrListNext (list)))
{
if (d)
@@ -1404,12 +1411,26 @@ FcDirCacheWrite (FcCache *cache, FcConfig *config)
FcDirCacheCreateTagFile (d);
break;
}
+ /* Record a path that was supposed to be a cache directory */
+ FcStrSetAdd (cpath, d);
}
}
if (!test_dir)
- fprintf (stderr, "Fontconfig error: No writable cache directories\n");
+ {
+ FcStrList *l;
+ FcChar8 *s;
+
+ l = FcStrListCreate (cpath);
+ fprintf (stderr, "\nFontconfig error: No writable cache directories\n");
+ while ((s = FcStrListNext (l)))
+ {
+ fprintf (stderr, "\t%s\n", s);
+ }
+ FcStrListDone (l);
+ }
if (d)
FcStrFree (d);
+ FcStrSetDestroy (cpath);
FcStrListDone (list);
if (!cache_dir)
return FcFalse;
--
GitLab
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化