dovecot-1.0: Handle RENAME "a" "a.b" correctly. Based on patch b...
dovecot at dovecot.org
dovecot at dovecot.org
Sun Oct 21 02:20:27 EEST 2007
details: http://hg.dovecot.org/dovecot-1.0/rev/c86684296ce8
changeset: 5426:c86684296ce8
user: Timo Sirainen <tss at iki.fi>
date: Sun Oct 21 02:20:23 2007 +0300
description:
Handle RENAME "a" "a.b" correctly. Based on patch by pod.
diffstat:
1 file changed, 7 insertions(+)
src/lib-storage/index/maildir/maildir-storage.c | 7 +++++++
diffs (17 lines):
diff -r 8dcc215fbc06 -r c86684296ce8 src/lib-storage/index/maildir/maildir-storage.c
--- a/src/lib-storage/index/maildir/maildir-storage.c Sun Oct 21 00:03:20 2007 +0300
+++ b/src/lib-storage/index/maildir/maildir-storage.c Sun Oct 21 02:20:23 2007 +0300
@@ -940,6 +940,13 @@ static int rename_subfolders(struct inde
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 = maildir_get_path(storage, old_listname);
newpath = maildir_get_path(storage, new_listname);
More information about the dovecot-cvs
mailing list