1
0
mirror of https://github.com/djcb/mu.git synced 2024-06-24 07:26:49 +02:00

Merge pull request #556 from abend/protect_msgid

mu-cmd-server.c: quote msgid in query
This commit is contained in:
Dirk-Jan C. Binnema 2015-01-09 07:08:53 +02:00
commit 25110722cb

View File

@ -258,7 +258,7 @@ get_docid_from_msgid (MuQuery *query, const char *str, GError **err)
unsigned docid;
MuMsgIter *iter;
querystr = g_strdup_printf ("msgid:%s", str);
querystr = g_strdup_printf ("msgid:\"%s\"", str);
iter = mu_query_run (query, querystr,
MU_MSG_FIELD_ID_NONE,
1, MU_QUERY_FLAG_NONE, err);
@ -293,7 +293,7 @@ get_docids_from_msgids (MuQuery *query, const char *str, GError **err)
MuMsgIter *iter;
GSList *lst;
querystr = g_strdup_printf ("msgid:%s", str);
querystr = g_strdup_printf ("msgid:\"%s\"", str);
iter = mu_query_run (query, querystr, MU_MSG_FIELD_ID_NONE,
-1 /*unlimited*/, MU_QUERY_FLAG_NONE,
err);