diff options
Diffstat (limited to 'libappstream-glib/as-app.c')
-rw-r--r-- | libappstream-glib/as-app.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/libappstream-glib/as-app.c b/libappstream-glib/as-app.c index e7ab906..e58b544 100644 --- a/libappstream-glib/as-app.c +++ b/libappstream-glib/as-app.c @@ -3433,6 +3433,14 @@ as_app_parse_file_key (AsApp *app, return FALSE; } + /* not a standard category */ + if (g_str_has_prefix (list[i], "X-")) + continue; + + /* check the category is valid */ + if (!as_utils_is_category_id (list[i])) + continue; + /* ignore some useless keys */ if (g_strcmp0 (list[i], "GTK") == 0) continue; @@ -3442,8 +3450,6 @@ as_app_parse_file_key (AsApp *app, continue; if (g_strcmp0 (list[i], "GNOME") == 0) continue; - if (g_str_has_prefix (list[i], "X-")) - continue; as_app_add_category (app, list[i], -1); } |