dovecot-2.0: lib-index: Try to handle index directory deletion m...

dovecot at dovecot.org dovecot at dovecot.org
Mon May 31 21:09:45 EEST 2010


details:   http://hg.dovecot.org/dovecot-2.0/rev/3efe9dcbed3e
changeset: 11435:3efe9dcbed3e
user:      Timo Sirainen <tss at iki.fi>
date:      Mon May 31 19:09:41 2010 +0100
description:
lib-index: Try to handle index directory deletion more nicely.

diffstat:

 src/lib-index/mail-transaction-log.c |  7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diffs (17 lines):

diff -r 2bb7ce1fb8a0 -r 3efe9dcbed3e src/lib-index/mail-transaction-log.c
--- a/src/lib-index/mail-transaction-log.c	Mon May 31 18:57:46 2010 +0100
+++ b/src/lib-index/mail-transaction-log.c	Mon May 31 19:09:41 2010 +0100
@@ -306,6 +306,13 @@
 							  "stat()");
 			return -1;
 		}
+		/* see if the whole directory got deleted */
+		if (nfs_safe_stat(log->index->dir, &st) < 0 &&
+		    errno == ENOENT) {
+			log->index->index_deleted = TRUE;
+			return -1;
+		}
+
 		/* the file should always exist at this point. if it doesn't,
 		   someone deleted it manually while the index was open. try to
 		   handle this nicely by creating a new log file. */


More information about the dovecot-cvs mailing list