]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
Added error checking
authorTimo Sirainen <tss@iki.fi>
Tue, 20 Jul 2004 18:45:43 +0000 (21:45 +0300)
committerTimo Sirainen <tss@iki.fi>
Tue, 20 Jul 2004 18:45:43 +0000 (21:45 +0300)
--HG--
branch : HEAD

src/lib-storage/index/mbox/mbox-storage.c

index 5ef3614a98eb5e1f45406a4ecf7f7494c46e5b1a..f1b64e34349703045c8e49a18965b207e3fd3b9d 100644 (file)
@@ -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)