dovecot: If control dir isn't the same as root dir, we created ....
dovecot at dovecot.org
dovecot at dovecot.org
Sun Oct 21 16:59:20 EEST 2007
details: http://hg.dovecot.org/dovecot/rev/952540aef485
changeset: 6595:952540aef485
user: Timo Sirainen <tss at iki.fi>
date: Sun Oct 21 16:59:15 2007 +0300
description:
If control dir isn't the same as root dir, we created .box/.box/ directory
instead of just .box/.
diffstat:
1 file changed, 3 insertions(+), 6 deletions(-)
src/lib-storage/index/maildir/maildir-storage.c | 9 +++------
diffs (27 lines):
diff -r 2bd0aaeb35f3 -r 952540aef485 src/lib-storage/index/maildir/maildir-storage.c
--- a/src/lib-storage/index/maildir/maildir-storage.c Sun Oct 21 16:51:15 2007 +0300
+++ b/src/lib-storage/index/maildir/maildir-storage.c Sun Oct 21 16:59:15 2007 +0300
@@ -348,7 +348,7 @@ static int create_maildir(struct mail_st
static int create_control_dir(struct mail_storage *storage, const char *name)
{
- const char *control_dir, *root_dir, *dir;
+ const char *control_dir, *root_dir;
control_dir = mailbox_list_get_path(storage->list, name,
MAILBOX_LIST_PATH_TYPE_CONTROL);
@@ -357,12 +357,9 @@ static int create_control_dir(struct mai
if (strcmp(control_dir, root_dir) == 0)
return 0;
- dir = t_strdup_printf("%s/%c%s", control_dir,
- mailbox_list_get_hierarchy_sep(storage->list),
- name);
- if (mkdir_parents(dir, CREATE_MODE) < 0 && errno != EEXIST) {
+ if (mkdir_parents(control_dir, CREATE_MODE) < 0 && errno != EEXIST) {
mail_storage_set_critical(storage,
- "mkdir(%s) failed: %m", dir);
+ "mkdir(%s) failed: %m", control_dir);
return -1;
}
More information about the dovecot-cvs
mailing list