Mercurial > dovecot > original-hg > dovecot-1.2
changeset 2751:c835f7e5e0e4 HEAD
Try to create the whole directory structure up to root_dir if it doesn't exist.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Fri, 15 Oct 2004 16:37:58 +0300 |
parents | 63fb0678a7d6 |
children | 3a195d649a73 |
files | src/lib-storage/index/mbox/mbox-storage.c |
diffstat | 1 files changed, 3 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib-storage/index/mbox/mbox-storage.c Fri Oct 15 16:03:11 2004 +0300 +++ b/src/lib-storage/index/mbox/mbox-storage.c Fri Oct 15 16:37:58 2004 +0300 @@ -206,8 +206,9 @@ root_dir = t_strndup(root_dir, len-1); /* make sure the directory exists */ - if (mkdir(root_dir, CREATE_MODE) < 0 && errno != EEXIST) { - i_error("mkdir(%s) failed: %m", root_dir); + if (mkdir_parents(root_dir, CREATE_MODE) < 0 && + errno != EEXIST) { + i_error("mkdir_parents(%s) failed: %m", root_dir); return NULL; } }