summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDirk-Jan C. Binnema <djcb@djcbsoftware.nl>2011-07-18 09:05:56 +0300
committerDirk-Jan C. Binnema <djcb@djcbsoftware.nl>2011-07-18 09:05:56 +0300
commitedebc8d07b83db3ccbbdf9898817ec1699d2631d (patch)
treea5efb1b43dc9585a673598b1a8958aeaf0661b69 /src
parent3b7f2ab25dff6b76594d6e29eb291caabb67bb58 (diff)
* log index, cleanup separately, less confusing + cosmetic
Diffstat (limited to 'src')
-rw-r--r--src/mu-cmd-index.c19
-rw-r--r--src/mu-index.c9
2 files changed, 14 insertions, 14 deletions
diff --git a/src/mu-cmd-index.c b/src/mu-cmd-index.c
index cad0be5..2242f67 100644
--- a/src/mu-cmd-index.c
+++ b/src/mu-cmd-index.c
@@ -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
diff --git a/src/mu-index.c b/src/mu-index.c
index 8cef66e..0d3fffc 100644
--- a/src/mu-index.c
+++ b/src/mu-index.c
@@ -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)