Commit cb1df8cb authored by Akira TAGOH's avatar Akira TAGOH

Don't warn if path can't be converted with prefix

parent 34791c32
......@@ -2076,6 +2076,11 @@ FcParseRemapDir (FcConfigParse *parse)
FcConfigMessage (parse, FcSevereError, "out of memory");
return;
}
if (data[0] == 0)
{
FcConfigMessage (parse, FcSevereWarning, "empty font directory name for remap ignored");
return;
}
path = FcConfigGetAttribute (parse, "as-path");
if (!path)
{
......@@ -2086,7 +2091,9 @@ FcParseRemapDir (FcConfigParse *parse)
salt = FcConfigGetAttribute (parse, "salt");
prefix = _get_real_path_from_prefix (parse, data, attr);
if (!prefix || prefix[0] == 0)
FcConfigMessage (parse, FcSevereWarning, "empty font directory name for remap ignored");
{
/* nop */
}
else if (!parse->scanOnly && (!FcStrUsesHome (prefix) || FcConfigHome ()))
{
if (!FcConfigAddFontDir (parse->config, prefix, path, salt))
......@@ -2257,11 +2264,18 @@ FcParseDir (FcConfigParse *parse)
FcConfigMessage (parse, FcSevereError, "out of memory");
return;
}
if (data[0] == 0)
{
FcConfigMessage (parse, FcSevereWarning, "empty font directory name ignored");
return;
}
attr = FcConfigGetAttribute (parse, "prefix");
salt = FcConfigGetAttribute (parse, "salt");
prefix = _get_real_path_from_prefix (parse, data, attr);
if (!prefix || prefix[0] == 0)
FcConfigMessage (parse, FcSevereWarning, "empty font directory name ignored");
{
/* nop */
}
else if (!parse->scanOnly && (!FcStrUsesHome (prefix) || FcConfigHome ()))
{
if (!FcConfigAddFontDir (parse->config, prefix, NULL, salt))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment