fix severing of msg -> srec links upon maildir rescan

amends 9c86ec34 (the relevant line was arguably misplaced there, and
should have been in 2277ecef or whereabouts already).
This commit is contained in:
Oswald Buddenhagen 2022-04-20 11:10:09 +02:00
parent f74b4e0d11
commit 2e17f427a9

View File

@ -1239,7 +1239,6 @@ maildir_init_msg( maildir_store_t *ctx, maildir_message_t *msg, msg_t *entry )
msg->msgid = entry->msgid;
entry->msgid = NULL; /* prevent deletion */
msg->size = entry->size;
msg->srec = NULL;
memcpy( msg->tuid, entry->tuid, TUIDL );
if (entry->recent)
msg->status |= M_RECENT;
@ -1259,6 +1258,7 @@ maildir_app_msg( maildir_store_t *ctx, maildir_message_t ***msgapp, msg_t *entry
*msgapp = &msg->next;
msg->uid = entry->uid;
msg->status = 0;
msg->srec = NULL;
maildir_init_msg( ctx, msg, entry );
}