summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Hughes <richard@hughsie.com>2016-02-26 10:04:13 +0000
committerRichard Hughes <richard@hughsie.com>2016-02-26 10:19:53 +0000
commitbe68554e8b1d78e24c92c46a20c76a96848d3d9a (patch)
tree9c9999d2f9c99b182746e6c1e8e8a4833f6b5768
parentdd309be525277ddc93c3002b36fceb097e14a122 (diff)
downloadappstream-glib-be68554e8b1d78e24c92c46a20c76a96848d3d9a.tar.gz
Do not tokenize mimetypes
-rw-r--r--libappstream-glib/as-app.c2
-rw-r--r--libappstream-glib/as-self-test.c2
-rw-r--r--libappstream-glib/as-utils.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/libappstream-glib/as-app.c b/libappstream-glib/as-app.c
index e51da39..53578db 100644
--- a/libappstream-glib/as-app.c
+++ b/libappstream-glib/as-app.c
@@ -4265,7 +4265,7 @@ as_app_create_token_cache_target (AsApp *app, AsApp *donor)
}
for (i = 0; i < priv->mimetypes->len; i++) {
tmp = g_ptr_array_index (priv->mimetypes, i);
- as_app_add_tokens (app, tmp, "C", AS_APP_TOKEN_MATCH_MIMETYPE);
+ as_app_add_token (app, tmp, AS_APP_TOKEN_MATCH_MIMETYPE);
}
for (i = 0; i < priv->pkgnames->len; i++) {
tmp = g_ptr_array_index (priv->pkgnames, i);
diff --git a/libappstream-glib/as-self-test.c b/libappstream-glib/as-self-test.c
index ef7ed6e..ad4aef9 100644
--- a/libappstream-glib/as-self-test.c
+++ b/libappstream-glib/as-self-test.c
@@ -2564,7 +2564,7 @@ as_test_app_search_func (void)
{
const gchar *all[] = { "gnome", "install", "software", NULL };
const gchar *none[] = { "gnome", "xxx", "software", NULL };
- const gchar *mime[] = { "oasis", "opendocument", NULL };
+ const gchar *mime[] = { "application/vnd.oasis.opendocument.text", NULL };
g_autoptr(AsApp) app = NULL;
app = as_app_new ();
diff --git a/libappstream-glib/as-utils.c b/libappstream-glib/as-utils.c
index b7a69dd..171ef74 100644
--- a/libappstream-glib/as-utils.c
+++ b/libappstream-glib/as-utils.c
@@ -1551,7 +1551,7 @@ as_utils_search_token_valid (const gchar *token)
"uses", "font", "features", "designed", "provides", "which",
"many", "used", "org", "fonts", "open", "more", "based",
"different", "including", "will", "multiple", "out", "have",
- "each", "when", "need", "vnd", "most", "both", "their", "even",
+ "each", "when", "need", "most", "both", "their", "even",
"way", "several", "been", "while", "very", "add", "under",
"what", "those", "much", "either", "currently", "one",
"support", "make", "over", "these", "there", "without", "etc",