trivial: case insensitive while explorering cabinet files

The cabinet file's extension name disregards uppercase or lowercase
This commit is contained in:
Crag Wang 2020-03-05 23:42:53 +08:00 committed by Mario Limonciello
parent 2a0c066a2f
commit ae422989f3

View File

@ -2649,9 +2649,10 @@ fu_engine_create_metadata (FuEngine *self, XbBuilder *builder,
g_autoptr(XbBuilderSource) source = NULL;
g_autoptr(GError) error_local = NULL;
const gchar *fn = g_ptr_array_index (files, i);
g_autofree gchar *fn_lowercase = g_ascii_strdown (fn, -1);
/* check is cab file */
if (!g_str_has_suffix (fn, ".cab")) {
if (!g_str_has_suffix (fn_lowercase, ".cab")) {
g_debug ("ignoring: %s", fn);
continue;
}