From: Timo Sirainen Date: Mon, 28 Jun 2010 20:58:42 +0000 (+0100) Subject: mdbox: Don't fail storage rebuild just because storage/ directory doesn't exist. X-Git-Tag: 2.0.rc1~67 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ac1ef9c1bd8c4fbb63d22db88f3c130f1ddf9374;p=thirdparty%2Fdovecot%2Fcore.git mdbox: Don't fail storage rebuild just because storage/ directory doesn't exist. It may be an account for a new user that doesn't yet have any mails. --HG-- branch : HEAD --- diff --git a/src/lib-storage/index/dbox-multi/mdbox-storage-rebuild.c b/src/lib-storage/index/dbox-multi/mdbox-storage-rebuild.c index accb07ec90..f5b4e0a13a 100644 --- a/src/lib-storage/index/dbox-multi/mdbox-storage-rebuild.c +++ b/src/lib-storage/index/dbox-multi/mdbox-storage-rebuild.c @@ -887,20 +887,8 @@ int mdbox_storage_rebuild_in_context(struct mdbox_storage *storage, struct mdbox_map_atomic_context *atomic) { struct mdbox_storage_rebuild_context *ctx; - struct stat st; int ret; - if (stat(storage->storage_dir, &st) < 0) { - if (errno == ENOENT) { - /* no multi-dbox files */ - return 0; - } - - mail_storage_set_critical(&storage->storage.storage, - "stat(%s) failed: %m", storage->storage_dir); - return -1; - } - ctx = mdbox_storage_rebuild_init(storage, atomic); ret = mdbox_storage_rebuild_scan(ctx); mdbox_storage_rebuild_deinit(ctx);