changeset 13708:7559768b1491

lib-storage: Use namespace owner user's home dir for autodetection (for shared namespaces).
author Timo Sirainen <tss@iki.fi>
date Wed, 16 Nov 2011 19:38:16 +0200
parents a695e124e62f
children e5fb66051028
files src/lib-storage/index/dbox-multi/mdbox-storage.c src/lib-storage/index/maildir/maildir-storage.c src/lib-storage/index/mbox/mbox-storage.c
diffstat 3 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/lib-storage/index/dbox-multi/mdbox-storage.c	Wed Nov 16 19:14:43 2011 +0200
+++ b/src/lib-storage/index/dbox-multi/mdbox-storage.c	Wed Nov 16 19:38:16 2011 +0200
@@ -87,7 +87,7 @@
 	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)
--- a/src/lib-storage/index/maildir/maildir-storage.c	Wed Nov 16 19:14:43 2011 +0200
+++ b/src/lib-storage/index/maildir/maildir-storage.c	Wed Nov 16 19:38:16 2011 +0200
@@ -97,7 +97,7 @@
 
 	/* 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)
--- a/src/lib-storage/index/mbox/mbox-storage.c	Wed Nov 16 19:14:43 2011 +0200
+++ b/src/lib-storage/index/mbox/mbox-storage.c	Wed Nov 16 19:38:16 2011 +0200
@@ -246,7 +246,7 @@
 	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 = "";