Skip to content

Commit

Permalink
lib-storage: If root dir already exists as file, log better error mes…
Browse files Browse the repository at this point in the history
…sage.
  • Loading branch information
sirainen authored and Timo Sirainen committed Jul 25, 2017
1 parent a602629 commit d85f37f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/lib-storage/mailbox-list.c
Expand Up @@ -1213,6 +1213,11 @@ int mailbox_list_try_mkdir_root(struct mailbox_list *list, const char *path,
if (stat(path, &st) == 0) {
/* looks like it already exists, don't bother checking
further. */
if (!S_ISDIR(st.st_mode)) {
*error_r = t_strdup_printf(
"Root directory is a file: %s", path);
return -1;
}
return 0;
}

Expand Down

0 comments on commit d85f37f

Please sign in to comment.