From 34fbdf1c779d47615d961fe2d76ac243ce26a40d Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Mon, 9 Sep 2002 17:51:27 +0000 Subject: Don't look for an end quote, instead look for to terminate the 2002-09-09 Jeffrey Stedfast * upgrade-mailer.c (shortcuts_upgrade_xml_file): Don't look for an end quote, instead look for to terminate the uri. svn path=/trunk/; revision=18021 --- mail/upgrade-mailer.c | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) (limited to 'mail/upgrade-mailer.c') diff --git a/mail/upgrade-mailer.c b/mail/upgrade-mailer.c index abcc827891..ff87eb11c5 100644 --- a/mail/upgrade-mailer.c +++ b/mail/upgrade-mailer.c @@ -597,36 +597,32 @@ mailer_upgrade_xml_file (GHashTable *imap_sources, const char *filename) static char * shortcuts_upgrade_uri (GHashTable *accounts, GHashTable *imap_sources, const char *account, const char *folder) { - char *url, *decoded, *new = NULL; + char *url, *name, *decoded, *new = NULL; struct _storeinfo *si; int type; - decoded = hex_decode (folder, strlen (folder)); - type = GPOINTER_TO_INT ((si = g_hash_table_lookup (accounts, account))); if (type == 1) { /* exchange */ - new = g_strdup_printf ("personal/%s", decoded); + decoded = hex_decode (folder, strlen (folder)); + name = g_strdup_printf ("personal/%s", decoded); g_free (decoded); - return new; + return name; } else { /* imap */ - url = g_strdup_printf ("%s/%s", si->base_url, decoded); + url = g_strdup_printf ("%s/%s", si->base_url, folder); new = imap_url_upgrade (imap_sources, url); - g_free (decoded); g_free (url); if (new) { - url = g_strdup (new + strlen (si->base_url) + 1); + name = g_strdup (new + strlen (si->base_url) + 1); g_free (new); - return url; + return name; } } - g_free (decoded); - return NULL; } -- cgit v1.2.3