PATCH: Create on post autocreatefolders patch.
Edward Rudd
eddie at omegaware.com
Sat Mar 22 23:05:52 EST 2003
Here is a patch to fix the autocreatefolders functionality of the
createonpost patch. This fixes the issues of it not working when
altnamespace and/or unixhierarchysep is enabled.
This is patch is based off of the source from Simon Matter's cyrus-imapd
src.rpm.
--
Edward Rudd <eddie at omegaware.com>
-------------- next part --------------
--- mboxlist.c.hierfix Sat Mar 22 21:37:53 2003
+++ mboxlist.c Sat Mar 22 21:53:36 2003
@@ -2870,10 +2870,21 @@
continue;
}
- len = strlen ("INBOX.") + strlen (p);
- name = xmalloc ((len + 1) * sizeof (char));
- memcpy (name, "INBOX.", strlen ("INBOX."));
- memcpy (name + strlen ("INBOX."), p, strlen (p));
+ if (!config_getswitch("altnamespace",0)) {
+ len = strlen ("INBOX.") + strlen (p);
+ name = xmalloc ((len + 1) * sizeof (char));
+ if (config_getswitch("unixhierarchysep", 0)) {
+ memcpy (name, "INBOX/", strlen ("INBOX."));
+ } else {
+ memcpy (name, "INBOX.", strlen ("INBOX."));
+ memcpy (name + strlen ("INBOX."), p, strlen (p));
+ }
+ } else {
+ len = strlen (p);
+ name = xmalloc ((len + 1) * sizeof (char));
+ memcpy (name,p,strlen(p));
+ }
+
name[len] = NULL;
i++;
More information about the Info-cyrus
mailing list