Commit e7fdeea1 authored by Adrien Plazas's avatar Adrien Plazas
Browse files

appdata: Don't assume app IDs don't finish by .desktop

This better handles the format of the sm.puri.sphosh force-adaptive
setting.
parent 1db59778
......@@ -473,6 +473,15 @@ gs_appstream_is_device_compatibility_forced (GsApp *app)
for (gint i = 0; ids[i]; i++) {
g_hash_table_add (ids_table, g_strdup (ids[i]));
g_hash_table_add (ids_table, g_strdup_printf ("%s.desktop", ids[i]));
if (g_str_has_suffix (ids[i], ".desktop")) {
gchar *id = g_strdup (ids[i]);
id[strlen (id) - 8] = '\0';
g_hash_table_add (ids_table, id);
}
else {
g_hash_table_add (ids_table, g_strdup_printf ("%s.desktop", ids[i]));
}
}
}
}
......
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