From 810321fb77c892476ae721afa0b4edcec33daf1f Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Wed, 16 Nov 2011 19:38:16 +0200 Subject: [PATCH] lib-storage: Use namespace owner user's home dir for autodetection (for shared namespaces). --- src/lib-storage/index/dbox-multi/mdbox-storage.c | 2 +- src/lib-storage/index/maildir/maildir-storage.c | 2 +- src/lib-storage/index/mbox/mbox-storage.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib-storage/index/dbox-multi/mdbox-storage.c b/src/lib-storage/index/dbox-multi/mdbox-storage.c index e3d90af703..cd52964661 100644 --- a/src/lib-storage/index/dbox-multi/mdbox-storage.c +++ b/src/lib-storage/index/dbox-multi/mdbox-storage.c @@ -87,7 +87,7 @@ mdbox_storage_find_root_dir(const struct mail_namespace *ns) bool debug = ns->mail_set->mail_debug; const char *home, *path; - if (mail_user_get_home(ns->user, &home) > 0) { + if (mail_user_get_home(ns->owner, &home) > 0) { path = t_strconcat(home, "/mdbox", NULL); if (access(path, R_OK|W_OK|X_OK) == 0) { if (debug) diff --git a/src/lib-storage/index/maildir/maildir-storage.c b/src/lib-storage/index/maildir/maildir-storage.c index e1424171aa..e0b2c66784 100644 --- a/src/lib-storage/index/maildir/maildir-storage.c +++ b/src/lib-storage/index/maildir/maildir-storage.c @@ -97,7 +97,7 @@ maildir_storage_find_root_dir(const struct mail_namespace *ns) /* we'll need to figure out the maildir location ourself. It's ~/Maildir unless we are chrooted. */ - if (mail_user_get_home(ns->user, &home) > 0) { + if (mail_user_get_home(ns->owner, &home) > 0) { path = t_strconcat(home, "/Maildir", NULL); if (access(path, R_OK|W_OK|X_OK) == 0) { if (debug) diff --git a/src/lib-storage/index/mbox/mbox-storage.c b/src/lib-storage/index/mbox/mbox-storage.c index 003bca97a9..56f772a8ae 100644 --- a/src/lib-storage/index/mbox/mbox-storage.c +++ b/src/lib-storage/index/mbox/mbox-storage.c @@ -246,7 +246,7 @@ static const char *mbox_storage_find_root_dir(const struct mail_namespace *ns) bool debug = ns->mail_set->mail_debug; const char *home, *path; - if (mail_user_get_home(ns->user, &home) <= 0) { + if (mail_user_get_home(ns->owner, &home) <= 0) { if (debug) i_debug("maildir: Home directory not set"); home = ""; -- 2.47.3