Use xb_builder_source_add_simple_adapter

Use xb_builder_source_add_simple_adapter instead
xb_builder_source_add_adapter to avoid sniffing MIME type for output xml
contents

Signed-off-by: Daniel Campello <campello@chromium.org>
Change-Id: I123c37339720b5844351f85a5aeb9cec4928785c
This commit is contained in:
Daniel Campello 2020-02-27 11:10:08 -07:00 committed by Richard Hughes
parent c6eb416fd5
commit 227cefb74f

View File

@ -174,9 +174,15 @@ fu_quirks_add_quirks_for_path (FuQuirks *self, XbBuilder *builder,
g_autoptr(XbBuilderSource) source = xb_builder_source_new ();
/* load from keyfile */
#if LIBXMLB_CHECK_VERSION(0,1,15)
xb_builder_source_add_simple_adapter (source, "text/plain,.quirk",
fu_quirks_convert_quirk_to_xml_cb,
NULL, NULL);
#else
xb_builder_source_add_adapter (source, "text/plain,.quirk",
fu_quirks_convert_quirk_to_xml_cb,
NULL, NULL);
#endif
if (!xb_builder_source_load_file (source, file,
XB_BUILDER_SOURCE_FLAG_WATCH_FILE |
XB_BUILDER_SOURCE_FLAG_LITERAL_TEXT,