server: update query processing
fix quoting issues with mu4e
This commit is contained in:
@ -93,7 +93,9 @@ struct MuProc: public Mux::ProcIface {
|
|||||||
if (!name || !pfx)
|
if (!name || !pfx)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
fields.push_back ({{name}, {pfx}, id});
|
fields.push_back ({{name}, {pfx},
|
||||||
|
mu_msg_field_xapian_index(id),
|
||||||
|
id});
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<FieldInfo>
|
std::vector<FieldInfo>
|
||||||
|
|||||||
@ -557,6 +557,7 @@ read_val (const char *str, const char **endval, GError **err)
|
|||||||
}
|
}
|
||||||
} else if (*cur == '"') {
|
} else if (*cur == '"') {
|
||||||
quoted = !quoted;
|
quoted = !quoted;
|
||||||
|
g_string_append_c (gstr, *cur);
|
||||||
continue;
|
continue;
|
||||||
} else if (isblank(*cur) && !quoted)
|
} else if (isblank(*cur) && !quoted)
|
||||||
break;
|
break;
|
||||||
|
|||||||
@ -175,7 +175,8 @@ test_mu_store_store_msg_remove_and_count (void)
|
|||||||
g_assert_cmpuint (0,==,mu_store_count (store, NULL));
|
g_assert_cmpuint (0,==,mu_store_count (store, NULL));
|
||||||
g_assert_cmpuint (FALSE,==,mu_store_contains_message
|
g_assert_cmpuint (FALSE,==,mu_store_contains_message
|
||||||
(store,
|
(store,
|
||||||
MU_TESTMAILDIR "/cur/1283599333.1840_11.cthulhu!2,", NULL));
|
MU_TESTMAILDIR "/cur/1283599333.1840_11.cthulhu!2,",
|
||||||
|
NULL));
|
||||||
g_free (tmpdir);
|
g_free (tmpdir);
|
||||||
mu_store_unref (store);
|
mu_store_unref (store);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -113,7 +113,7 @@ test_parse_arglist (void)
|
|||||||
GHashTable *hash;
|
GHashTable *hash;
|
||||||
GError *err;
|
GError *err;
|
||||||
|
|
||||||
args = "cmd:find query:\"maildir:\\\"/sent items\\\"\" maxnum:500";
|
args = "cmd:find query:maildir:\"/sent items\" maxnum:500";
|
||||||
|
|
||||||
err = NULL;
|
err = NULL;
|
||||||
hash = mu_str_parse_arglist (args, &err);
|
hash = mu_str_parse_arglist (args, &err);
|
||||||
|
|||||||
Reference in New Issue
Block a user