]> git.wh0rd.org - fontconfig.git/blobdiff - src/fcxml.c
Change RCS tag
[fontconfig.git] / src / fcxml.c
index 257b6cc146acaa63d8c08d40862d7f89eb77eec8..033de96794b46e69f8287446dfbccb30d722d7e9 100644 (file)
@@ -1,7 +1,7 @@
 /*
- * $XFree86: xc/lib/fontconfig/src/fcxml.c,v 1.21 2002/08/22 18:53:22 keithp Exp $
+ * $RCSId: xc/lib/fontconfig/src/fcxml.c,v 1.21 2002/08/22 18:53:22 keithp Exp $
  *
- * Copyright © 2002 Keith Packard, member of The XFree86 Project, Inc.
+ * Copyright © 2002 Keith Packard
  *
  * Permission to use, copy, modify, distribute, and sell this software and its
  * documentation for any purpose is hereby granted without fee, provided that
@@ -1600,8 +1600,11 @@ FcEndElement(void *userData, const XML_Char *name)
            FcConfigMessage (parse, FcSevereError, "out of memory");
            break;
        }
-       if (!FcConfigAddDir (parse->config, data))
-           FcConfigMessage (parse, FcSevereError, "out of memory");
+       if (!FcStrUsesHome (data) || FcConfigHome ())
+       {
+           if (!FcConfigAddDir (parse->config, data))
+               FcConfigMessage (parse, FcSevereError, "out of memory");
+       }
        FcStrFree (data);
        break;
     case FcElementCache:
@@ -1611,8 +1614,11 @@ FcEndElement(void *userData, const XML_Char *name)
            FcConfigMessage (parse, FcSevereError, "out of memory");
            break;
        }
-       if (!FcConfigSetCache (parse->config, data))
-           FcConfigMessage (parse, FcSevereError, "out of memory");
+       if (!FcStrUsesHome (data) || FcConfigHome ())
+       {
+           if (!FcConfigSetCache (parse->config, data))
+               FcConfigMessage (parse, FcSevereError, "out of memory");
+       }
        FcStrFree (data);
        break;
     case FcElementInclude: