X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=notmuch-show.c;h=43bf71c8c8924e80c28f08469d2615642cba44b4;hp=528694be91932aa5b83c77933bfe48ffa8aebde4;hb=be8e796fd51ffe956ac70b10868851ebbf56fcab;hpb=c7453773064efbd0b2cd17b15ba483edbd28ce1e diff --git a/notmuch-show.c b/notmuch-show.c index 528694be..43bf71c8 100644 --- a/notmuch-show.c +++ b/notmuch-show.c @@ -1015,9 +1015,13 @@ do_show (void *ctx, notmuch_messages_t *messages; notmuch_status_t status, res = NOTMUCH_STATUS_SUCCESS; + threads = notmuch_query_search_threads (query); + if (! threads) + return 1; + sp->begin_list (sp); - for (threads = notmuch_query_search_threads (query); + for ( ; notmuch_threads_valid (threads); notmuch_threads_move_to_next (threads)) { @@ -1078,7 +1082,8 @@ notmuch_show_command (notmuch_config_t *config, int argc, char *argv[]) .output_body = TRUE, .crypto = { .verify = FALSE, - .decrypt = FALSE + .decrypt = FALSE, + .gpgpath = NULL }, .include_html = FALSE }; @@ -1199,6 +1204,8 @@ notmuch_show_command (notmuch_config_t *config, int argc, char *argv[]) return EXIT_FAILURE; } + params.crypto.gpgpath = notmuch_config_get_crypto_gpg_path (config); + if (notmuch_database_open (notmuch_config_get_database_path (config), NOTMUCH_DATABASE_MODE_READ_ONLY, ¬much)) return EXIT_FAILURE;