dovecot: If both source and destination storage had the same sep...

dovecot at dovecot.org dovecot at dovecot.org
Thu Aug 9 21:03:23 EEST 2007


details:   http://hg.dovecot.org/dovecot/rev/f108845caaa1
changeset: 6253:f108845caaa1
user:      Timo Sirainen <tss at iki.fi>
date:      Thu Aug 09 21:03:20 2007 +0300
description:
If both source and destination storage had the same separator, we changed
the separators to alt_hierarchy_char.

diffstat:

1 file changed, 4 insertions(+), 1 deletion(-)
src/plugins/convert/convert-storage.c |    5 ++++-

diffs (19 lines):

diff -r 27d9b2114266 -r f108845caaa1 src/plugins/convert/convert-storage.c
--- a/src/plugins/convert/convert-storage.c	Thu Aug 09 20:47:12 2007 +0300
+++ b/src/plugins/convert/convert-storage.c	Thu Aug 09 21:03:20 2007 +0300
@@ -116,11 +116,14 @@ mailbox_name_convert(struct mail_storage
 	src_sep = mail_storage_get_hierarchy_sep(source_storage);
 	dest_sep = mail_storage_get_hierarchy_sep(dest_storage);
 
+	if (src_sep == dest_sep)
+		return name;
+
 	dest_name = t_strdup_noconst(name);
 	for (p = dest_name; *p != '\0'; p++) {
 		if (*p == dest_sep)
 			*p = set->alt_hierarchy_char;
-		if (*p == src_sep)
+		else if (*p == src_sep)
 			*p = dest_sep;
 	}
 	return dest_name;


More information about the dovecot-cvs mailing list