mu-cmd: update for lib/mu-store changes

* some small API updates
 * in with_store, try to rebuild automatically when possible
This commit is contained in:
Dirk-Jan C. Binnema
2019-07-28 14:25:19 +03:00
parent 83d6484f86
commit afde8811b6
8 changed files with 111 additions and 122 deletions

View File

@ -229,17 +229,11 @@ get_query_obj (MuStore *store, GError **err)
return NULL;
if (count == 0) {
g_set_error (err, MU_ERROR_DOMAIN, MU_ERROR_XAPIAN_IS_EMPTY,
g_set_error (err, MU_ERROR_DOMAIN, MU_ERROR_XAPIAN_NEEDS_REINDEX,
"the database is empty");
return NULL;
}
if (!mu_store_versions_match (store)) {
g_set_error (err, MU_ERROR_DOMAIN, MU_ERROR_XAPIAN_VERSION_MISMATCH,
"the database needs a rebuild");
return NULL;
}
mquery = mu_query_new (store, err);
if (!mquery)
return NULL;