From: Timo Sirainen Date: Tue, 20 Jul 2004 18:45:43 +0000 (+0300) Subject: Added error checking X-Git-Tag: 1.1.alpha1~3762 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=55e4dbce4afcf53b49520b96e46fc85d243e1231;p=thirdparty%2Fdovecot%2Fcore.git Added error checking --HG-- branch : HEAD --- diff --git a/src/lib-storage/index/mbox/mbox-storage.c b/src/lib-storage/index/mbox/mbox-storage.c index 5ef3614a98..f1b64e3434 100644 --- a/src/lib-storage/index/mbox/mbox-storage.c +++ b/src/lib-storage/index/mbox/mbox-storage.c @@ -389,6 +389,10 @@ static int verify_inbox(struct index_storage *storage) fd = open(storage->inbox_path, O_RDWR | O_CREAT | O_EXCL, 0660); if (fd != -1) (void)close(fd); + else if (errno != EEXIST) { + mail_storage_set_critical(storage, + "open(%s, O_CREAT) failed: %m", storage->inbox_file); + } /* make sure the index directories exist */ if (create_mbox_index_dirs(storage, "INBOX") < 0)