mirror of https://github.com/djcb/mu.git
server: update query processing
fix quoting issues with mu4e
This commit is contained in:
parent
6ce7c89488
commit
509500a9d2
|
@ -93,7 +93,9 @@ struct MuProc: public Mux::ProcIface {
|
|||
if (!name || !pfx)
|
||||
return;
|
||||
|
||||
fields.push_back ({{name}, {pfx}, id});
|
||||
fields.push_back ({{name}, {pfx},
|
||||
mu_msg_field_xapian_index(id),
|
||||
id});
|
||||
}
|
||||
|
||||
std::vector<FieldInfo>
|
||||
|
|
|
@ -557,6 +557,7 @@ read_val (const char *str, const char **endval, GError **err)
|
|||
}
|
||||
} else if (*cur == '"') {
|
||||
quoted = !quoted;
|
||||
g_string_append_c (gstr, *cur);
|
||||
continue;
|
||||
} else if (isblank(*cur) && !quoted)
|
||||
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 (FALSE,==,mu_store_contains_message
|
||||
(store,
|
||||
MU_TESTMAILDIR "/cur/1283599333.1840_11.cthulhu!2,", NULL));
|
||||
MU_TESTMAILDIR "/cur/1283599333.1840_11.cthulhu!2,",
|
||||
NULL));
|
||||
g_free (tmpdir);
|
||||
mu_store_unref (store);
|
||||
}
|
||||
|
|
|
@ -113,7 +113,7 @@ test_parse_arglist (void)
|
|||
GHashTable *hash;
|
||||
GError *err;
|
||||
|
||||
args = "cmd:find query:\"maildir:\\\"/sent items\\\"\" maxnum:500";
|
||||
args = "cmd:find query:maildir:\"/sent items\" maxnum:500";
|
||||
|
||||
err = NULL;
|
||||
hash = mu_str_parse_arglist (args, &err);
|
||||
|
|
Loading…
Reference in New Issue