From 6093cf098260b390980b2a8da34477d1874e5b9c Mon Sep 17 00:00:00 2001 From: Not Zed Date: Fri, 11 Jun 2004 08:30:16 +0000 Subject: handle a null path or fragment. 2004-06-11 Not Zed * em-utils.c (em_uri_from_camel): handle a null path or fragment. * em-folder-tree-model.c (em_folder_tree_model_add_store): set the full name of the store to "". Fixes #59925 and probably other issues. Related to the removal of folderinfo->path. svn path=/trunk/; revision=26305 --- mail/em-utils.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'mail/em-utils.c') diff --git a/mail/em-utils.c b/mail/em-utils.c index c82d2c9636..6cc735e981 100644 --- a/mail/em-utils.c +++ b/mail/em-utils.c @@ -1556,12 +1556,16 @@ char *em_uri_from_camel(const char *curi) else uid = account->uid; path = (provider->url_flags & CAMEL_URL_FRAGMENT_IS_PATH)?curl->fragment:curl->path; - if (path[0] == '/') - path++; + if (path) { + if (path[0] == '/') + path++; - tmp = camel_url_encode(path, ";?"); - euri = g_strdup_printf("email://%s/%s", uid, tmp); - g_free(tmp); + tmp = camel_url_encode(path, ";?"); + euri = g_strdup_printf("email://%s/%s", uid, tmp); + g_free(tmp); + } else { + euri = g_strdup_printf("email://%s/", uid); + } d(printf("em uri from camel '%s' -> '%s'\n", curi, euri)); -- cgit v1.2.3