* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see http://www.gnu.org/licenses/ .
+ * along with this program. If not, see https://www.gnu.org/licenses/ .
*
* Author: Carl Worth <cworth@cworth.org>
*/
g_mime_part_get_filename (GMIME_PART (node->part)) : NULL;
if (disposition &&
- strcmp (disposition->disposition, GMIME_DISPOSITION_ATTACHMENT) == 0)
+ strcasecmp (g_mime_content_disposition_get_disposition (disposition),
+ GMIME_DISPOSITION_ATTACHMENT) == 0)
part_type = "attachment";
else
part_type = "part";
{
notmuch_messages_t *messages;
notmuch_message_t *message;
+ notmuch_status_t status;
+ unsigned int count;
+
+ status = notmuch_query_count_messages_st (query, &count);
+ if (print_status_query ("notmuch show", query, status))
+ return 1;
- if (notmuch_query_count_messages (query) != 1) {
- fprintf (stderr, "Error: search term did not match precisely one message.\n");
+ if (count != 1) {
+ fprintf (stderr, "Error: search term did not match precisely one message (matched %d messages).\n", count);
return 1;
}
- messages = notmuch_query_search_messages (query);
+ status = notmuch_query_search_messages_st (query, &messages);
+ if (print_status_query ("notmuch show", query, status))
+ return 1;
+
message = notmuch_messages_get (messages);
if (message == NULL) {
notmuch_messages_t *messages;
notmuch_status_t status, res = NOTMUCH_STATUS_SUCCESS;
- threads = notmuch_query_search_threads (query);
- if (! threads)
+ status= notmuch_query_search_threads_st (query, &threads);
+ if (print_status_query ("notmuch show", query, status))
return 1;
sp->begin_list (sp);