From 6a603b5cf40882d2c558a7a29c394032694d2315 Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Thu, 3 Jun 2004 20:24:28 +0000 Subject: If the last_uri string value is the Evolution 1.4 URI, change it to the 2004-06-03 Jeffrey Stedfast * conduits/calendar/calendar-conduit.c (calconduit_load_configuration): If the last_uri string value is the Evolution 1.4 URI, change it to the new URI. Fixes bug #54134. svn path=/trunk/; revision=26203 --- calendar/conduits/calendar/calendar-conduit.c | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) (limited to 'calendar/conduits') diff --git a/calendar/conduits/calendar/calendar-conduit.c b/calendar/conduits/calendar/calendar-conduit.c index e471d83944..f733cd8c50 100644 --- a/calendar/conduits/calendar/calendar-conduit.c +++ b/calendar/conduits/calendar/calendar-conduit.c @@ -132,8 +132,25 @@ calconduit_load_configuration (guint32 pilot_id) c->secret = gnome_config_get_bool ("secret=FALSE"); c->multi_day_split = gnome_config_get_bool ("multi_day_split=TRUE"); - c->last_uri = gnome_config_get_string ("last_uri"); - + if ((c->last_uri = gnome_config_get_string ("last_uri")) && !strncmp (c->last_uri, "file://", 7)) { + const char *path = c->last_uri + 7; + const char *home; + + home = g_get_home_dir (); + + if (!strncmp (path, home, strlen (home))) { + path += strlen (home); + if (*path == '/') + path++; + + if (!strcmp (path, "evolution/local/Calendar/calendar.ics")) { + /* need to upgrade the last_uri. yay. */ + g_free (c->last_uri); + c->last_uri = g_strdup_printf ("file://%s/.evolution/calendar/local/system/calendar.ics", home); + } + } + } + gnome_config_pop_prefix (); return c; -- cgit