* mu-query.cc: fix behaviour of empty queries

This commit is contained in:
djcb
2011-11-27 16:23:46 +02:00
parent ce686d76d2
commit 2b5b2f8262

View File

@ -323,7 +323,8 @@ mu_query_run (MuQuery *self, const char* searchexpr, gboolean threads,
if (!threads && sortfieldid != MU_MSG_FIELD_ID_NONE)
enq.set_sort_by_value ((Xapian::valueno)sortfieldid,
revert ? true : false);
if (!mu_str_is_empty(searchexpr)) /* NULL or "" */
if (!mu_str_is_empty(searchexpr) &&
g_strcmp0 (searchexpr, "\"\"") != 0) /* NULL or "" or """" */
enq.set_query(get_query (self, searchexpr, err));
else
enq.set_query(Xapian::Query::MatchAll);