aboutsummaryrefslogtreecommitdiff
path: root/fontconfig/src/fcxml.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2013-09-04 16:27:02 +0200
committermarha <marha@users.sourceforge.net>2013-09-04 16:27:02 +0200
commitb828531d8b6da75a258d12f97df0f4e49f75ab98 (patch)
treefcb5da3afc321bb34cdfd8cd84dfd986a1f59083 /fontconfig/src/fcxml.c
parent9e382b6be0e81397f18ec0b733a2e88dc3465a33 (diff)
downloadvcxsrv-b828531d8b6da75a258d12f97df0f4e49f75ab98.tar.gz
vcxsrv-b828531d8b6da75a258d12f97df0f4e49f75ab98.tar.bz2
vcxsrv-b828531d8b6da75a258d12f97df0f4e49f75ab98.zip
fontconfig xkeyboard-config git update 4 Sep 2013
xkeyboard-config commit 8f49c92c54c53eab6d40d8be90ce06773d20d196 fontconfig commit 6720892e97f11fbe8d69ae5b3875d928c68ff90e mesa commit 51a279254fecc05691524dab1bf291c7dfefccd5
Diffstat (limited to 'fontconfig/src/fcxml.c')
-rw-r--r--fontconfig/src/fcxml.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/fontconfig/src/fcxml.c b/fontconfig/src/fcxml.c
index b464b4ede..8ff10b6e6 100644
--- a/fontconfig/src/fcxml.c
+++ b/fontconfig/src/fcxml.c
@@ -2233,11 +2233,6 @@ FcParseInclude (FcConfigParse *parse)
/* No config dir nor file on the XDG directory spec compliant place
* so need to guess what it is supposed to be.
*/
- FcChar8 *parent = FcStrDirname (s);
-
- if (!FcFileIsDir (parent))
- FcMakeDirectory (parent);
- FcStrFree (parent);
if (FcStrStr (s, (const FcChar8 *)"conf.d") != NULL)
goto userdir;
else
@@ -2259,6 +2254,11 @@ FcParseInclude (FcConfigParse *parse)
{
if (FcFileIsDir (filename))
{
+ FcChar8 *parent = FcStrDirname (userdir);
+
+ if (!FcFileIsDir (parent))
+ FcMakeDirectory (parent);
+ FcStrFree (parent);
if (FcFileIsDir (userdir) ||
rename ((const char *)filename, (const char *)userdir) != 0 ||
symlink ((const char *)userdir, (const char *)filename) != 0)
@@ -2272,6 +2272,11 @@ FcParseInclude (FcConfigParse *parse)
}
else
{
+ FcChar8 *parent = FcStrDirname (userconf);
+
+ if (!FcFileIsDir (parent))
+ FcMakeDirectory (parent);
+ FcStrFree (parent);
if (FcFileIsFile (userconf) ||
rename ((const char *)filename, (const char *)userconf) != 0 ||
symlink ((const char *)userconf, (const char *)filename) != 0)