[dovecot-cvs]
dovecot/src/lib-storage/index/mbox mbox-storage.c,1.65,1.66
cras at procontrol.fi
cras at procontrol.fi
Mon Sep 15 21:49:06 EEST 2003
Update of /home/cvs/dovecot/src/lib-storage/index/mbox
In directory danu:/tmp/cvs-serv26207/lib-storage/index/mbox
Modified Files:
mbox-storage.c
Log Message:
Ignore hierarchy separator at the end of mailbox name.
Index: mbox-storage.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib-storage/index/mbox/mbox-storage.c,v
retrieving revision 1.65
retrieving revision 1.66
diff -u -d -r1.65 -r1.66
--- mbox-storage.c 15 Sep 2003 17:38:37 -0000 1.65
+++ mbox-storage.c 15 Sep 2003 17:49:04 -0000 1.66
@@ -222,6 +222,12 @@
char *dup, *p, sep;
size_t len;
+ len = strlen(name);
+ if (len > 1 && name[len-1] == storage->hierarchy_sep) {
+ /* mailbox and mailbox/ should be treated equally */
+ name = t_strndup(name, len-1);
+ }
+
if (strncasecmp(name, "INBOX", 5) == 0 &&
(name[5] == '\0' || name[5] == storage->hierarchy_sep)) {
name = t_strconcat("INBOX", name+5, NULL);
More information about the dovecot-cvs
mailing list