]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-storage: Fixed expanding "~" (without '/' afterwards) in mail_location
authorTimo Sirainen <tss@iki.fi>
Tue, 9 Nov 2010 18:36:37 +0000 (18:36 +0000)
committerTimo Sirainen <tss@iki.fi>
Tue, 9 Nov 2010 18:36:37 +0000 (18:36 +0000)
src/lib-storage/mailbox-list.c

index bbd19a0d9d7a56cc9a6a7df34a95b69487e9a5d0..97827e134cac5a5b6b3c7f8403be486613361c72 100644 (file)
@@ -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(