* log index, cleanup separately, less confusing + cosmetic
This commit is contained in:
@ -318,21 +318,22 @@ cmd_index (MuIndex *midx, MuConfig *opts, MuIndexStats *stats,
|
||||
g_print ("\n");
|
||||
show_time ((unsigned)(time(NULL)-t),stats->_processed);
|
||||
}
|
||||
|
||||
if (rv == MU_OK || rv == MU_STOP)
|
||||
MU_WRITE_LOG ("index: processed: %u; updated/new: %u",
|
||||
stats->_processed, stats->_updated);
|
||||
|
||||
if (rv == MU_OK && !opts->nocleanup) {
|
||||
mu_index_stats_clear (stats);
|
||||
rv = cmd_cleanup (midx, opts, stats, show_progress);
|
||||
if (rv == MU_OK) {
|
||||
MU_WRITE_LOG ("cleanup: processed: %u; cleaned-up: %u",
|
||||
stats->_processed, stats->_cleaned_up);
|
||||
return MU_EXITCODE_OK;
|
||||
}
|
||||
}
|
||||
|
||||
if (rv == MU_OK || rv == MU_STOP) {
|
||||
MU_WRITE_LOG ("processed: %u; updated/new: %u, "
|
||||
"cleaned-up: %u",
|
||||
stats->_processed, stats->_updated,
|
||||
stats->_cleaned_up);
|
||||
return MU_EXITCODE_OK;
|
||||
}
|
||||
|
||||
return MU_EXITCODE_ERROR;
|
||||
return (rv==MU_OK||rv==MU_STOP) ? MU_EXITCODE_OK : MU_EXITCODE_ERROR;
|
||||
}
|
||||
|
||||
static MuExitCode
|
||||
|
||||
@ -105,11 +105,10 @@ struct _MuIndexCallbackData {
|
||||
typedef struct _MuIndexCallbackData MuIndexCallbackData;
|
||||
|
||||
|
||||
/* checks to determine if we need to (re)index this message
|
||||
* note: just check timestamps is not good enough because
|
||||
* message may be moved from other dirs (e.g. from 'new' to
|
||||
* 'cur') and the time stamps won't change.
|
||||
* */
|
||||
/* checks to determine if we need to (re)index this message note:
|
||||
* simply checking timestamps is not good enough because message may
|
||||
* be moved from other dirs (e.g. from 'new' to 'cur') and the time
|
||||
* stamps won't change. */
|
||||
static inline gboolean
|
||||
needs_index (MuIndexCallbackData *data, const char *fullpath,
|
||||
time_t filestamp)
|
||||
|
||||
Reference in New Issue
Block a user