Mercurial > dovecot > original-hg > dovecot-1.2
diff src/lib-index/mail-index.c @ 91:dc0891523276 HEAD
bugfix for sync fix
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Thu, 29 Aug 2002 01:42:00 +0300 |
parents | 616d71338d52 |
children | edc37d046b08 |
line wrap: on
line diff
--- a/src/lib-index/mail-index.c Thu Aug 29 01:39:13 2002 +0300 +++ b/src/lib-index/mail-index.c Thu Aug 29 01:42:00 2002 +0300 @@ -462,10 +462,15 @@ index->set_flags |= MAIL_INDEX_FLAG_REBUILD; } - /* finally reset the modify log marks, fsck or syncing might have - deleted some messages, and since we're only just opening the - index, there's no need to remember them */ - return mail_modifylog_mark_synced(index->modifylog); + if (index->lock_type == MAIL_LOCK_EXCLUSIVE) { + /* finally reset the modify log marks, fsck or syncing might + have deleted some messages, and since we're only just + opening the index, there's no need to remember them */ + if (!mail_modifylog_mark_synced(index->modifylog)) + return FALSE; + } + + return TRUE; } static int mail_index_open_file(MailIndex *index, const char *filename,