Mercurial > dovecot > core-2.2
changeset 3632:277906fcc8ea HEAD
Don't break if mail root directory is '/'.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Sat, 01 Oct 2005 12:47:17 +0300 |
parents | fe63974d6365 |
children | 1e053e5e160d |
files | src/lib-storage/index/mbox/mbox-storage.c |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib-storage/index/mbox/mbox-storage.c Sat Oct 01 12:00:42 2005 +0300 +++ b/src/lib-storage/index/mbox/mbox-storage.c Sat Oct 01 12:47:17 2005 +0300 @@ -304,7 +304,8 @@ root_dir = t_strndup(root_dir, len-1); /* make sure the directory exists */ - if (lstat(root_dir, &st) == 0) { + if (*root_dir == '\0' || + lstat(root_dir, &st) == 0) { /* yep, go ahead */ } else if (errno != ENOENT && errno != ENOTDIR) { i_error("lstat(%s) failed: %m", root_dir);