/*
- * $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
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:
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: