diff options
-rw-r--r-- | calendar/ChangeLog | 6 | ||||
-rw-r--r-- | calendar/conduits/calendar/calendar-conduit.c | 21 |
2 files changed, 25 insertions, 2 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog index cf2cc952df..7246943e2a 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,3 +1,9 @@ +2004-06-03 Jeffrey Stedfast <fejj@novell.com> + + * 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. + 2004-06-03 Rodrigo Moya <rodrigo@novell.com> Fixes #59481 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; |