[dovecot-cvs] dovecot/src/lib-storage/index/mbox mbox-storage.c,1.26,1.27
cras at procontrol.fi
cras at procontrol.fi
Sat Dec 28 11:54:59 EET 2002
Update of /home/cvs/dovecot/src/lib-storage/index/mbox
In directory danu:/tmp/cvs-serv30305/src/lib-storage/index/mbox
Modified Files:
mbox-storage.c
Log Message:
Complain about missing mbox file.
Index: mbox-storage.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib-storage/index/mbox/mbox-storage.c,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -d -r1.26 -r1.27
--- mbox-storage.c 21 Dec 2002 13:51:55 -0000 1.26
+++ mbox-storage.c 28 Dec 2002 09:54:56 -0000 1.27
@@ -87,7 +87,12 @@
[:INBOX=<path>] [:INDEX=<dir>] */
p = strchr(data, ':');
if (p == NULL) {
- if (stat(data, &st) == 0 && S_ISDIR(st.st_mode))
+ if (stat(data, &st) < 0) {
+ i_error("Invalid mbox file %s: %m", data);
+ return NULL;
+ }
+
+ if (S_ISDIR(st.st_mode))
root_dir = data;
else {
root_dir = get_root_dir();
More information about the dovecot-cvs
mailing list