From af75cca70337d1c83723a513811696bfed80ef99 Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Fri, 23 Jan 2004 20:48:59 +0000 Subject: Handle where the file: url is roken (ie, points to a location out of the 2004-01-23 Jeffrey Stedfast * em-migrate.c (upgrade_xml_uris_1_4): Handle where the file: url is roken (ie, points to a location out of the evolution namespace). svn path=/trunk/; revision=24388 --- mail/ChangeLog | 6 ++++++ mail/em-migrate.c | 8 +++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/mail/ChangeLog b/mail/ChangeLog index 3e3848fb78..0075a5a909 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,9 @@ +2004-01-23 Jeffrey Stedfast + + * em-migrate.c (upgrade_xml_uris_1_4): Handle where the file: url + is roken (ie, points to a location out of the evolution + namespace). + 2004-01-23 Rodney Dawes * em-folder-selector.c: Set the mnemonic widget for "Folder _name:" diff --git a/mail/em-migrate.c b/mail/em-migrate.c index 2961c049a1..6ef3a3acf6 100644 --- a/mail/em-migrate.c +++ b/mail/em-migrate.c @@ -1712,7 +1712,13 @@ upgrade_xml_uris_1_4 (const char *uri) camel_url_set_host (url, "local"); prefix = g_build_filename (g_get_home_dir (), "evolution", "local", NULL); - g_assert (strncmp (url->path, prefix, strlen (prefix)) == 0); + if (strncmp (url->path, prefix, strlen (prefix)) != 0) { + /* uri is busticated - user probably copied from another user's home directory */ + camel_url_free (url); + g_free (prefix); + + return g_strdup (uri); + } path = g_strdup (url->path + strlen (prefix)); g_free (prefix); -- cgit v1.2.3