changeset 4985:c2a4ea08d681 HEAD

mail_full_filesystem_access=yes: Fixed handling mailboxes beginning with ~.
author Timo Sirainen <tss@iki.fi>
date Thu, 04 Jan 2007 00:40:34 +0200
parents 0caa09cc3edb
children 5088f394fa72
files src/lib-storage/list/mailbox-list-fs.c src/lib-storage/list/mailbox-list-maildir.c
diffstat 2 files changed, 9 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/lib-storage/list/mailbox-list-fs.c	Thu Jan 04 00:38:27 2007 +0200
+++ b/src/lib-storage/list/mailbox-list-fs.c	Thu Jan 04 00:40:34 2007 +0200
@@ -160,8 +160,11 @@
 	i_assert(mailbox_list_is_valid_existing_name(_list, name));
 
 	if ((list->list.flags & MAILBOX_LIST_FLAG_FULL_FS_ACCESS) != 0 &&
-	    (*name == '/' || *name == '~'))
-		return name;
+	    (*name == '/' || *name == '~')) {
+		if (home_try_expand(&name) == 0)
+			return name;
+		/* fallback to using ~dir */
+	}
 
 	switch (type) {
 	case MAILBOX_LIST_PATH_TYPE_DIR:
--- a/src/lib-storage/list/mailbox-list-maildir.c	Thu Jan 04 00:38:27 2007 +0200
+++ b/src/lib-storage/list/mailbox-list-maildir.c	Thu Jan 04 00:40:34 2007 +0200
@@ -39,7 +39,10 @@
 {
 	const char *p;
 
-	name = home_expand(name);
+	if (home_try_expand(&name) < 0) {
+		/* fallback to using as ~name */
+		return name;
+	}
 
 	p = strrchr(name, '/');
 	if (p == NULL)