[dovecot-cvs] dovecot/src/lib-storage/list mailbox-list-fs.c, 1.2, 1.3 mailbox-list-maildir.c, 1.3, 1.4

tss at dovecot.org tss at dovecot.org
Wed Jan 3 22:40:37 UTC 2007


Update of /var/lib/cvs/dovecot/src/lib-storage/list
In directory talvi:/tmp/cvs-serv9316/lib-storage/list

Modified Files:
	mailbox-list-fs.c mailbox-list-maildir.c 
Log Message:
mail_full_filesystem_access=yes: Fixed handling mailboxes beginning with ~.


Index: mailbox-list-fs.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/list/mailbox-list-fs.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- mailbox-list-fs.c	25 Nov 2006 22:17:50 -0000	1.2
+++ mailbox-list-fs.c	3 Jan 2007 22:40:34 -0000	1.3
@@ -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:

Index: mailbox-list-maildir.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/list/mailbox-list-maildir.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- mailbox-list-maildir.c	25 Nov 2006 22:17:50 -0000	1.3
+++ mailbox-list-maildir.c	3 Jan 2007 22:40:34 -0000	1.4
@@ -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)



More information about the dovecot-cvs mailing list