From 227cefb74fbe9665349e547ecc1e3eeb318b27c0 Mon Sep 17 00:00:00 2001 From: Daniel Campello Date: Thu, 27 Feb 2020 11:10:08 -0700 Subject: [PATCH] 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 Change-Id: I123c37339720b5844351f85a5aeb9cec4928785c --- libfwupdplugin/fu-quirks.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libfwupdplugin/fu-quirks.c b/libfwupdplugin/fu-quirks.c index 473b00639..0125f422c 100644 --- a/libfwupdplugin/fu-quirks.c +++ b/libfwupdplugin/fu-quirks.c @@ -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,