From 55e4dbce4afcf53b49520b96e46fc85d243e1231 Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Tue, 20 Jul 2004 21:45:43 +0300 Subject: [PATCH] Added error checking --HG-- branch : HEAD --- src/lib-storage/index/mbox/mbox-storage.c | 4 ++++ 1 file changed, 4 insertions(+) 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) -- 2.47.3