From: Timo Sirainen Date: Tue, 9 Nov 2010 18:36:37 +0000 (+0000) Subject: lib-storage: Fixed expanding "~" (without '/' afterwards) in mail_location X-Git-Tag: 2.0.8~107 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9abf5be0962538e1f6f5c73c838ff677341da0c9;p=thirdparty%2Fdovecot%2Fcore.git lib-storage: Fixed expanding "~" (without '/' afterwards) in mail_location --- diff --git a/src/lib-storage/mailbox-list.c b/src/lib-storage/mailbox-list.c index bbd19a0d9d..97827e134c 100644 --- a/src/lib-storage/mailbox-list.c +++ b/src/lib-storage/mailbox-list.c @@ -205,7 +205,7 @@ static int fix_path(struct mail_user *user, const char *path, 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(