{
if (cache->hdr->file_seq != cache->index->hdr->cache_file_seq) {
if (mail_cache_lock(cache, TRUE) == 0) {
- *new_file_seq_r = cache->index->hdr->cache_file_seq;
+ *new_file_seq_r = cache->hdr->file_seq;
return TRUE;
}
}
index = mail_index_view_get_index(view);
log = index->log;
- if (t->updates == NULL && t->cache_updates == NULL &&
- t->expunges == NULL && t->appends == NULL && !t->hdr_changed) {
+ if (t->updates == NULL && t->new_cache_file_seq == 0 &&
+ t->cache_updates == NULL && t->expunges == NULL &&
+ t->appends == NULL && !t->hdr_changed) {
/* nothing to append */
*log_file_seq_r = 0;
*log_file_offset_r = 0;