]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-storage: raw: get_stream() - Add missing lookup_abort and mail_stream_accessed...
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Mon, 29 Nov 2021 17:35:31 +0000 (18:35 +0100)
committeraki.tuomi <aki.tuomi@open-xchange.com>
Tue, 21 Dec 2021 10:06:58 +0000 (10:06 +0000)
src/lib-storage/index/raw/raw-mail.c

index b8bbb87cd98c140cf87c42d3d512a06c0a76cb90..2e9033ae3100561e4cbf651c08fa6265a2a058d1 100644 (file)
@@ -85,6 +85,11 @@ raw_mail_get_stream(struct mail *_mail, bool get_body ATTR_UNUSED,
        struct index_mail *mail = INDEX_MAIL(_mail);
 
        if (mail->data.stream == NULL) {
+               if (_mail->lookup_abort != MAIL_LOOKUP_ABORT_NEVER) {
+                       mail_set_aborted(_mail);
+                       return -1;
+               }
+               _mail->mail_stream_accessed = TRUE;
                /* we can't just reference mbox->input, because
                   index_mail_close() expects to be able to free the stream */
                mail->data.stream =