changeset 12404:d1cf770dbef5

lib-storage: Fixed expanding "~" (without '/' afterwards) in mail_location
author Timo Sirainen <tss@iki.fi>
date Tue, 09 Nov 2010 18:36:37 +0000
parents f859a6e06b62
children e72ab743b8df
files src/lib-storage/mailbox-list.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/lib-storage/mailbox-list.c	Mon Nov 08 19:55:35 2010 +0000
+++ b/src/lib-storage/mailbox-list.c	Tue Nov 09 18:36:37 2010 +0000
@@ -205,7 +205,7 @@
 
 	if (len > 1 && path[len-1] == '/')
 		path = t_strndup(path, len-1);
-	if (path[0] == '~' && path[1] != '/') {
+	if (path[0] == '~' && path[1] != '/' && path[1] != '\0') {
 		/* ~otheruser/dir */
 		if (home_try_expand(&path) < 0) {
 			*error_r = t_strconcat(