From d1c08db8f581444104233f2380b4591eca836f6a Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Sat, 10 Apr 2010 08:13:39 +0300 Subject: [PATCH] mdbox: If storage directory doesn't exist while trying to purge, ignore it. --HG-- branch : HEAD --- src/lib-storage/index/dbox-multi/mdbox-sync.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/lib-storage/index/dbox-multi/mdbox-sync.c b/src/lib-storage/index/dbox-multi/mdbox-sync.c index 1167dc29c0..c3b8e009df 100644 --- a/src/lib-storage/index/dbox-multi/mdbox-sync.c +++ b/src/lib-storage/index/dbox-multi/mdbox-sync.c @@ -359,6 +359,10 @@ static int mdbox_sync_altmove_add_files(struct mdbox_storage *dstorage, 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; -- 2.47.3