]> git.notmuchmail.org Git - notmuch/blobdiff - notmuch-index-message.cc
Reduce the verbosity of the progress indicator.
[notmuch] / notmuch-index-message.cc
index 60370b62b99621f6d8ec1eea491d0b5b96c003ad..f1f9e3ada90373a938b35d3fafde457012942006 100644 (file)
@@ -253,6 +253,9 @@ skip_re_in_subject (const char *subject)
 {
     const char *s = subject;
 
+    if (subject == NULL)
+       return NULL;
+
     while (*s) {
        while (*s && isspace (*s))
            s++;
@@ -472,7 +475,17 @@ gen_terms_part (Xapian::TermGenerator term_gen,
        return;
     }
 
-    if (! GMIME_IS_PART (part)) {
+    if (GMIME_IS_MESSAGE_PART (part)) {
+       GMimeMessage *message;
+
+       message = g_mime_message_part_get_message (GMIME_MESSAGE_PART (part));
+
+       gen_terms_part (term_gen, g_mime_message_get_mime_part (message));
+
+       return;
+    }
+
+    if (! (GMIME_IS_PART (part))) {
        fprintf (stderr, "Warning: Not indexing unknown mime part: %s.\n",
                 g_type_name (G_OBJECT_TYPE (part)));
        return;
@@ -722,7 +735,7 @@ main (int argc, char **argv)
            g_free (filename);
 
            count++;
-           if (count % 250 == 0) {
+           if (count % 1000 == 0) {
                gettimeofday (&tv_now, NULL);
                printf ("Indexed %d messages (%g messages/second)\n",
                        count, count / ((tv_now.tv_sec - tv_start.tv_sec) +