changeset 3642:aab106e80c3c HEAD

If mbox root directory doesn't exist, create it instead of just giving error message.
author Timo Sirainen <tss@iki.fi>
date Fri, 07 Oct 2005 12:42:35 +0300
parents 3de464cb604f
children 5207179e47de
files src/lib-storage/index/mbox/mbox-storage.c
diffstat 1 files changed, 2 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/src/lib-storage/index/mbox/mbox-storage.c	Fri Oct 07 12:34:04 2005 +0300
+++ b/src/lib-storage/index/mbox/mbox-storage.c	Fri Oct 07 12:42:35 2005 +0300
@@ -269,12 +269,8 @@
 			i_info("mbox: data=%s", data);
 		p = strchr(data, ':');
 		if (p == NULL) {
-			if (stat(data, &st) < 0) {
-				i_error("Invalid mbox path %s: %m", data);
-				return NULL;
-			}
-
-			if (S_ISDIR(st.st_mode))
+			/* if the data points to a file, treat it as an INBOX */
+			if (stat(data, &st) < 0 || S_ISDIR(st.st_mode))
 				root_dir = data;
 			else {
 				root_dir = get_root_dir(flags);