Otherwise the HIGHESTMODSEQ is just whatever happens to be in the in-memory
view of the index, which most likely isn't the true HIGHESTMODSEQ. Using 0
makes it clear that the HIGHESTMODSEQ isn't valid and can't be used.
mailbox_get_open_status(brain->box, STATUS_UIDNEXT |
STATUS_HIGHESTMODSEQ |
STATUS_HIGHESTPVTMODSEQ, &status);
+ if (status.nonpermanent_modseqs)
+ status.highest_modseq = 0;
if (ret == 0) {
if (pvt_too_old) {
desync_reason = t_strdup_printf(
*error_r = error;
return -1;
}
+ if (status.nonpermanent_modseqs)
+ status.highest_modseq = 0;
i_assert(status.uidvalidity != 0 || status.messages == 0);
mailbox_get_open_status(importer->box, STATUS_UIDNEXT |
STATUS_HIGHESTMODSEQ | STATUS_HIGHESTPVTMODSEQ,
&status);
+ if (status.nonpermanent_modseqs)
+ status.highest_modseq = 0;
importer->local_uid_next = status.uidnext;
importer->local_initial_highestmodseq = status.highest_modseq;
importer->local_initial_highestpvtmodseq = status.highest_pvt_modseq;