Mercurial > dovecot > original-hg > dovecot-1.2
changeset 91:dc0891523276 HEAD
bugfix for sync fix
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Thu, 29 Aug 2002 01:42:00 +0300 |
parents | ccb155c2c93f |
children | a73e43fa20e0 |
files | src/lib-index/mail-index.c |
diffstat | 1 files changed, 9 insertions(+), 4 deletions(-) [+] |
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,