Mercurial > dovecot > core-2.2
changeset 11502:1aaa4b51cb14 HEAD
mdbox: stat() storage directory first before trying to mkdir it.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Tue, 08 Jun 2010 21:00:11 +0100 |
parents | 149d57c1a9c0 |
children | b7fadc4eac7a |
files | src/lib-storage/index/dbox-multi/mdbox-map.c |
diffstat | 1 files changed, 5 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib-storage/index/dbox-multi/mdbox-map.c Tue Jun 08 20:52:24 2010 +0100 +++ b/src/lib-storage/index/dbox-multi/mdbox-map.c Tue Jun 08 21:00:11 2010 +0100 @@ -89,6 +89,11 @@ static int mdbox_map_mkdir_storage(struct mdbox_map *map) { + struct stat st; + + if (stat(map->path, &st) == 0) + return 0; + if (mailbox_list_mkdir(map->root_list, map->path, MAILBOX_LIST_PATH_TYPE_DIR) < 0) { mail_storage_copy_list_error(MAP_STORAGE(map), map->root_list);