dovecot-2.0: mdbox: If storage directory doesn't exist while try...

dovecot at dovecot.org dovecot at dovecot.org
Sat Apr 10 08:13:42 EEST 2010


details:   http://hg.dovecot.org/dovecot-2.0/rev/5dac1012e47e
changeset: 11128:5dac1012e47e
user:      Timo Sirainen <tss at iki.fi>
date:      Sat Apr 10 08:13:39 2010 +0300
description:
mdbox: If storage directory doesn't exist while trying to purge, ignore it.

diffstat:

 src/lib-storage/index/dbox-multi/mdbox-sync.c |  4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diffs (14 lines):

diff -r 2200450752bd -r 5dac1012e47e src/lib-storage/index/dbox-multi/mdbox-sync.c
--- a/src/lib-storage/index/dbox-multi/mdbox-sync.c	Sat Apr 10 08:07:40 2010 +0300
+++ b/src/lib-storage/index/dbox-multi/mdbox-sync.c	Sat Apr 10 08:13:39 2010 +0300
@@ -359,6 +359,10 @@
 	   hopefully one of n-[1..m] is appendable in alt storage. */
 	dir = opendir(dstorage->storage_dir);
 	if (dir == NULL) {
+		if (errno == ENOENT) {
+			/* no storage directory at all yet */
+			return 0;
+		}
 		mail_storage_set_critical(storage,
 			"opendir(%s) failed: %m", dstorage->storage_dir);
 		return -1;


More information about the dovecot-cvs mailing list