]> code.citadel.org Git - citadel.git/commitdiff
* Change folder delimiter in room names from / to \
authorArt Cancro <ajc@citadel.org>
Sat, 3 May 2003 16:50:52 +0000 (16:50 +0000)
committerArt Cancro <ajc@citadel.org>
Sat, 3 May 2003 16:50:52 +0000 (16:50 +0000)
citadel/ChangeLog
citadel/imap_tools.c
citadel/imap_tools.h

index fe8bb845d47fdae71bae0519aaa5fb13ddb221b2..39dcfcd7670d0b6eab28290f5d9245509bdd7f12 100644 (file)
@@ -1,4 +1,7 @@
  $Log$
+ Revision 605.46  2003/05/03 16:50:52  ajc
+ * Change folder delimiter in room names from / to \
+
  Revision 605.45  2003/05/02 04:02:47  ajc
  * setup.c: allow specification of the Citadel system account by either
             username or uid
@@ -4676,4 +4679,3 @@ Sat Jul 11 00:20:48 EDT 1998 Nathan Bryant <bryant@cs.usm.maine.edu>
 
 Fri Jul 10 1998 Art Cancro <ajc@uncensored.citadel.org>
        * Initial CVS import
-
index d14f97ead758e437e8389f426b3f26669f30f02e..9b42b043ce6dbdb1382090a5460a649d3814db75 100644 (file)
@@ -116,10 +116,10 @@ void imap_mailboxname(char *buf, int bufsize, struct quickroom *qrbuf)
        }
 
        /*
-        * Replace "/" characters with "|" for pseudo-folder-delimiting
+        * Replace delimiter characters with "|" for pseudo-folder-delimiting
         */
        for (i=0; i<strlen(buf); ++i) {
-               if (buf[i] == '/') buf[i] = '|';
+               if (buf[i] == FDELIM) buf[i] = '|';
        }
 }
 
@@ -179,9 +179,9 @@ int imap_roomname(char *rbuf, int bufsize, char *foldername)
                ret = (0 | IR_MAILBOX);
        }
 
-       /* Undelimiterizationalize the room name (change '|' to '/') */
+       /* Undelimiterizationalize the room name (change '|') */
        for (i=0; i<strlen(rbuf); ++i) {
-               if (rbuf[i] == '|') rbuf[i] = '/';
+               if (rbuf[i] == '|') rbuf[i] = FDELIM;
        }
 
 
index fef05ea2b3d082b0948318fc00762ba40748200e..f5ed8f74d6ff2f38fef2889ff7de6aadb1ff8d02 100644 (file)
@@ -3,7 +3,15 @@
  *
  */
 
-
+/*
+ * FDELIM defines which character we want to use as a folder delimiter
+ * in room names.  Originally we used a forward slash, but that caused
+ * rooms with names like "Sent/Received Pages" to get delimited, so we
+ * changed it to a backslash.  This is completely irrelevant to how Citadel
+ * speaks to IMAP clients -- the delimiter used in the IMAP protocol is
+ * a vertical bar, which is illegal in Citadel room names anyway.
+ */
+#define FDELIM '\\'
 
 void imap_strout(char *buf);
 int imap_parameterize(char **args, char *buf);