[dovecot-cvs] dovecot/src/lib-storage/index/mbox mbox-storage.c, 1.88, 1.89

cras at dovecot.org cras at dovecot.org
Tue Jul 20 21:45:46 EEST 2004


Update of /home/cvs/dovecot/src/lib-storage/index/mbox
In directory talvi:/tmp/cvs-serv26248

Modified Files:
	mbox-storage.c 
Log Message:
Added error checking



Index: mbox-storage.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib-storage/index/mbox/mbox-storage.c,v
retrieving revision 1.88
retrieving revision 1.89
diff -u -d -r1.88 -r1.89
--- mbox-storage.c	18 Jul 2004 02:25:08 -0000	1.88
+++ mbox-storage.c	20 Jul 2004 18:45:43 -0000	1.89
@@ -389,6 +389,10 @@
 	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)



More information about the dovecot-cvs mailing list