mirror of https://github.com/djcb/mu.git
mu: do a full index when the database is empty
I.e., do _not_ honor .noupdate in that case.
This commit is contained in:
parent
75c9079463
commit
7c3673b3de
4
NEWS.org
4
NEWS.org
|
@ -24,7 +24,9 @@
|
||||||
anymore. ~mu4e~ now depends on those parameters.
|
anymore. ~mu4e~ now depends on those parameters.
|
||||||
|
|
||||||
~init~ only needs to be run once or when changing these parameters. That
|
~init~ only needs to be run once or when changing these parameters. That
|
||||||
implies that you need to re-index after changing these parameters.
|
implies that you need to re-index after changing these parameters. The
|
||||||
|
~.noupdate~ files are ignored when indexing the first time after ~mu init~ (or
|
||||||
|
in general, when the database is empty).
|
||||||
|
|
||||||
- There is another new subcommand ~mu info~ to get information about the mu
|
- There is another new subcommand ~mu info~ to get information about the mu
|
||||||
database, the personal addresses etc.
|
database, the personal addresses etc.
|
||||||
|
|
|
@ -60,12 +60,7 @@ mu_index_new (MuStore *store, GError **err)
|
||||||
if (count == (unsigned)-1)
|
if (count == (unsigned)-1)
|
||||||
return NULL;
|
return NULL;
|
||||||
else if (count == 0)
|
else if (count == 0)
|
||||||
index->_needs_reindex = FALSE;
|
index->_needs_reindex = TRUE;
|
||||||
|
|
||||||
/* FIXME */
|
|
||||||
/* else */
|
|
||||||
/* index->_needs_reindex = */
|
|
||||||
/* mu_store_database_needs_upgrade (xpath); */
|
|
||||||
|
|
||||||
return index;
|
return index;
|
||||||
}
|
}
|
||||||
|
@ -341,10 +336,8 @@ mu_index_run (MuIndex *index, gboolean reindex, gboolean lazycheck,
|
||||||
if (!check_path (path))
|
if (!check_path (path))
|
||||||
return MU_ERROR;
|
return MU_ERROR;
|
||||||
|
|
||||||
if (!reindex && index->_needs_reindex) {
|
if (index->_needs_reindex)
|
||||||
g_warning ("database not up-to-date; needs full reindex");
|
reindex = TRUE;
|
||||||
return MU_ERROR;
|
|
||||||
}
|
|
||||||
|
|
||||||
init_cb_data (&cb_data, index->_store, reindex, lazycheck,
|
init_cb_data (&cb_data, index->_store, reindex, lazycheck,
|
||||||
index->_max_filesize, stats,
|
index->_max_filesize, stats,
|
||||||
|
|
Loading…
Reference in New Issue