changeset 5253:535ff7687388 HEAD

When returning mailbox name with GETQUOTAROOT, return the original name instead of the converted storage name.
author Timo Sirainen <tss@iki.fi>
date Fri, 09 Mar 2007 21:37:23 +0200
parents d9def64349d7
children 46e3249aa15b
files src/plugins/imap-quota/imap-quota-plugin.c
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/plugins/imap-quota/imap-quota-plugin.c	Fri Mar 09 17:35:18 2007 +0200
+++ b/src/plugins/imap-quota/imap-quota-plugin.c	Fri Mar 09 21:37:23 2007 +0200
@@ -55,13 +55,14 @@
 	struct mailbox *box;
 	struct quota_root_iter *iter;
         struct quota_root *root;
-	const char *mailbox;
+	const char *orig_mailbox, *mailbox;
 	string_t *str;
 
 	/* <mailbox> */
 	if (!client_read_string_args(cmd, 1, &mailbox))
 		return FALSE;
 
+	orig_mailbox = mailbox;
 	storage = client_find_storage(cmd, &mailbox);
 	if (storage == NULL)
 		return TRUE;
@@ -83,7 +84,7 @@
 	/* send QUOTAROOT reply */
 	str = t_str_new(128);
 	str_append(str, "* QUOTAROOT ");
-	imap_quote_append_string(str, mailbox, FALSE);
+	imap_quote_append_string(str, orig_mailbox, FALSE);
 
 	iter = quota_root_iter_init(quota_set, box);
 	while ((root = quota_root_iter_next(iter)) != NULL) {