X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=lib%2Fmessage-file.c;h=a41d9ad2a719df507d3091316d594bc38b3e4fc5;hb=41b870fba5d09653dd9f22315cbca47e9a8c0d31;hp=483ba1e98a1fd080f753f56e8aeae90ad1ff64e0;hpb=0cc0144875875fe974fe0851b5c2c21d63d9b06d;p=notmuch diff --git a/lib/message-file.c b/lib/message-file.c index 483ba1e9..a41d9ad2 100644 --- a/lib/message-file.c +++ b/lib/message-file.c @@ -99,19 +99,19 @@ _notmuch_message_file_open_ctx (void *ctx, const char *filename) FAIL: fprintf (stderr, "Error opening %s: %s\n", filename, strerror (errno)); - notmuch_message_file_close (message); + _notmuch_message_file_close (message); return NULL; } notmuch_message_file_t * -notmuch_message_file_open (const char *filename) +_notmuch_message_file_open (const char *filename) { return _notmuch_message_file_open_ctx (NULL, filename); } void -notmuch_message_file_close (notmuch_message_file_t *message) +_notmuch_message_file_close (notmuch_message_file_t *message) { talloc_free (message); } @@ -170,25 +170,12 @@ _notmuch_message_file_parse (notmuch_message_file_t *message) goto DONE; } - if (is_mbox) { - if (! g_mime_parser_eos (parser)) { - /* This is a multi-message mbox. */ - status = NOTMUCH_STATUS_FILE_NOT_EMAIL; - goto DONE; - } + if (is_mbox && ! g_mime_parser_eos (parser)) { /* - * For historical reasons, we support single-message mboxes, - * but this behavior is likely to change in the future, so - * warn. + * This is a multi-message mbox. (For historical reasons, we + * do support single-message mboxes.) */ - static notmuch_bool_t mbox_warning = FALSE; - if (! mbox_warning) { - mbox_warning = TRUE; - fprintf (stderr, "\ -Warning: %s is an mbox containing a single message,\n\ -likely caused by misconfigured mail delivery. Support for single-message\n\ -mboxes is deprecated and may be removed in the future.\n", message->filename); - } + status = NOTMUCH_STATUS_FILE_NOT_EMAIL; } DONE: @@ -297,7 +284,7 @@ _notmuch_message_file_get_combined_header (notmuch_message_file_t *message, } const char * -notmuch_message_file_get_header (notmuch_message_file_t *message, +_notmuch_message_file_get_header (notmuch_message_file_t *message, const char *header) { const char *value;