diff --git a/src/fcxml.c b/src/fcxml.c index 7797502..9d75249 100644 --- a/src/fcxml.c +++ b/src/fcxml.c @@ -2073,16 +2073,36 @@ FcParseDir (FcConfigParse *parse) #endif attr = FcConfigGetAttribute (parse, "prefix"); - if (attr && FcStrCmp (attr, (const FcChar8 *)"xdg") == 0) - { - prefix = FcConfigXdgDataHome (); - /* home directory might be disabled. - * simply ignore this element. - */ - if (!prefix) - goto bail; - } data = FcStrBufDoneStatic (&parse->pstack->str); + if (attr) + { + if (FcStrCmp (attr, (const FcChar8 *)"xdg") == 0) + { + prefix = FcConfigXdgDataHome (); + /* home directory might be disabled. + * simply ignore this element. + */ + if (!prefix) + goto bail; + } + else if (FcStrCmp (attr, (const FcChar8 *)"cwd") == 0) + { + } + else if (FcStrCmp (attr, (const FcChar8 *)"relative") == 0) + { + prefix = FcStrDirname (parse->name); + if (!prefix) + goto bail; + } + } +#ifndef _WIN32 + /* For Win32, check this later for dealing with special cases */ + else + { + if (!FcStrIsAbsoluteFilename (data) && data[0] != '~') + FcConfigMessage (parse, FcSevereWarning, "Use of ambiguous