Skip to content

Commit

Permalink
lib-storage: Generate snippet while saving new mails
Browse files Browse the repository at this point in the history
  • Loading branch information
Josef 'Jeff' Sipek authored and sirainen committed Feb 20, 2018
1 parent 54af5cc commit cac1deb
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/lib-storage/index/index-mail-headers.c
Expand Up @@ -386,6 +386,10 @@ index_mail_cache_parse_init(struct mail *_mail, struct istream *input)
mail->data.save_sent_date = TRUE;
mail->data.save_bodystructure_header = TRUE;
mail->data.save_bodystructure_body = TRUE;
/* Don't unnecessarily waste time generating a snippet, since it's
not as cheap as the others to generate. */
if (index_mail_want_cache(mail, MAIL_CACHE_BODY_SNIPPET))
mail->data.save_body_snippet = TRUE;

mail->data.tee_stream = tee_i_stream_create(input);
input = tee_i_stream_create_child(mail->data.tee_stream);
Expand Down

0 comments on commit cac1deb

Please sign in to comment.