changeset 11128:5dac1012e47e HEAD

mdbox: If storage directory doesn't exist while trying to purge, ignore it.
author Timo Sirainen <tss@iki.fi>
date Sat, 10 Apr 2010 08:13:39 +0300
parents 2200450752bd
children 06bd06c2f523
files src/lib-storage/index/dbox-multi/mdbox-sync.c
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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;