Don't warn if path can't be converted with prefix
This commit is contained in:
parent
34791c32f1
commit
cb1df8cb28
18
src/fcxml.c
18
src/fcxml.c
|
@ -2076,6 +2076,11 @@ FcParseRemapDir (FcConfigParse *parse)
|
||||||
FcConfigMessage (parse, FcSevereError, "out of memory");
|
FcConfigMessage (parse, FcSevereError, "out of memory");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (data[0] == 0)
|
||||||
|
{
|
||||||
|
FcConfigMessage (parse, FcSevereWarning, "empty font directory name for remap ignored");
|
||||||
|
return;
|
||||||
|
}
|
||||||
path = FcConfigGetAttribute (parse, "as-path");
|
path = FcConfigGetAttribute (parse, "as-path");
|
||||||
if (!path)
|
if (!path)
|
||||||
{
|
{
|
||||||
|
@ -2086,7 +2091,9 @@ FcParseRemapDir (FcConfigParse *parse)
|
||||||
salt = FcConfigGetAttribute (parse, "salt");
|
salt = FcConfigGetAttribute (parse, "salt");
|
||||||
prefix = _get_real_path_from_prefix (parse, data, attr);
|
prefix = _get_real_path_from_prefix (parse, data, attr);
|
||||||
if (!prefix || prefix[0] == 0)
|
if (!prefix || prefix[0] == 0)
|
||||||
FcConfigMessage (parse, FcSevereWarning, "empty font directory name for remap ignored");
|
{
|
||||||
|
/* nop */
|
||||||
|
}
|
||||||
else if (!parse->scanOnly && (!FcStrUsesHome (prefix) || FcConfigHome ()))
|
else if (!parse->scanOnly && (!FcStrUsesHome (prefix) || FcConfigHome ()))
|
||||||
{
|
{
|
||||||
if (!FcConfigAddFontDir (parse->config, prefix, path, salt))
|
if (!FcConfigAddFontDir (parse->config, prefix, path, salt))
|
||||||
|
@ -2257,11 +2264,18 @@ FcParseDir (FcConfigParse *parse)
|
||||||
FcConfigMessage (parse, FcSevereError, "out of memory");
|
FcConfigMessage (parse, FcSevereError, "out of memory");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (data[0] == 0)
|
||||||
|
{
|
||||||
|
FcConfigMessage (parse, FcSevereWarning, "empty font directory name ignored");
|
||||||
|
return;
|
||||||
|
}
|
||||||
attr = FcConfigGetAttribute (parse, "prefix");
|
attr = FcConfigGetAttribute (parse, "prefix");
|
||||||
salt = FcConfigGetAttribute (parse, "salt");
|
salt = FcConfigGetAttribute (parse, "salt");
|
||||||
prefix = _get_real_path_from_prefix (parse, data, attr);
|
prefix = _get_real_path_from_prefix (parse, data, attr);
|
||||||
if (!prefix || prefix[0] == 0)
|
if (!prefix || prefix[0] == 0)
|
||||||
FcConfigMessage (parse, FcSevereWarning, "empty font directory name ignored");
|
{
|
||||||
|
/* nop */
|
||||||
|
}
|
||||||
else if (!parse->scanOnly && (!FcStrUsesHome (prefix) || FcConfigHome ()))
|
else if (!parse->scanOnly && (!FcStrUsesHome (prefix) || FcConfigHome ()))
|
||||||
{
|
{
|
||||||
if (!FcConfigAddFontDir (parse->config, prefix, NULL, salt))
|
if (!FcConfigAddFontDir (parse->config, prefix, NULL, salt))
|
||||||
|
|
Loading…
Reference in New Issue