]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-storage: Use namespace owner user's home dir for autodetection (for shared namesp...
authorTimo Sirainen <tss@iki.fi>
Wed, 16 Nov 2011 17:38:16 +0000 (19:38 +0200)
committerTimo Sirainen <tss@iki.fi>
Wed, 16 Nov 2011 17:38:16 +0000 (19:38 +0200)
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

index e3d90af70329f8bb6b70d7ba36f0dedf150e67d7..cd529646618b25356ec3b9c8e1beff9208845c3c 100644 (file)
@@ -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)
index e1424171aacb04122d115e0ae70454e04919fb1f..e0b2c66784cc633474159cacb89c21189e607030 100644 (file)
@@ -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)
index 003bca97a9c2ba984a90952999490dd999a40304..56f772a8ae917b610bf90017717137d88bf00929 100644 (file)
@@ -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 = "";