Mercurial > dovecot > original-hg > dovecot-1.2
changeset 6578:d7ed8c41d8b3 HEAD
Handle RENAME "a" "a.b" correctly. Based on patch by pod.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Sun, 21 Oct 2007 02:20:23 +0300 |
parents | 5b2ff32877d4 |
children | 825621c540b8 |
files | src/lib-storage/list/mailbox-list-maildir.c |
diffstat | 1 files changed, 7 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib-storage/list/mailbox-list-maildir.c Sun Oct 21 01:43:48 2007 +0300 +++ b/src/lib-storage/list/mailbox-list-maildir.c Sun Oct 21 02:20:23 2007 +0300 @@ -342,6 +342,13 @@ t_push(); old_listname = t_strconcat(oldname, names[i], NULL); + if (strcmp(old_listname, newname) == 0) { + /* When doing RENAME "a" "a.b" we see "a.b" here. + We don't want to rename it anymore to "a.b.b". */ + t_pop(); + continue; + } + new_listname = t_strconcat(newname, names[i], NULL); oldpath = mailbox_list_get_path(list, old_listname, MAILBOX_LIST_PATH_TYPE_MAILBOX);