Mercurial > dovecot > original-hg > dovecot-1.2
changeset 869:2873d04a566e HEAD
Complain about missing mbox file.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Sat, 28 Dec 2002 11:54:56 +0200 |
parents | c0048f0ef101 |
children | 971947c0034f |
files | src/lib-storage/index/mbox/mbox-storage.c |
diffstat | 1 files changed, 6 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib-storage/index/mbox/mbox-storage.c Sat Dec 28 11:49:16 2002 +0200 +++ b/src/lib-storage/index/mbox/mbox-storage.c Sat Dec 28 11:54:56 2002 +0200 @@ -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();