From 4cbd8086782526f61d335c2b5ea767b5f997566e Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Tue, 27 Apr 2004 20:14:37 +0000 Subject: Fixed the version checks for migrating pilot data. (migrate_calendars): 2004-04-27 Jeffrey Stedfast * gui/migration.c (migrate_tasks): Fixed the version checks for migrating pilot data. (migrate_calendars): Same. (migrate_pilot_data): Doh. Take a third argument to specify what component we are migrating ("todo" vs "calendar") so that we can compare against the correct filename. Might help :-) (migrate_pilot_db_key): Just set an empty value for the data since there's no way to actually get it and I don't think it really matters anyway. svn path=/trunk/; revision=25642 --- calendar/gui/migration.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'calendar/gui/migration.c') diff --git a/calendar/gui/migration.c b/calendar/gui/migration.c index d649534bf6..6cb1d5c2f9 100644 --- a/calendar/gui/migration.c +++ b/calendar/gui/migration.c @@ -552,11 +552,11 @@ create_task_sources (TasksComponent *component, } static void -migrate_pilot_db_key (const char *key, const char *data, gpointer user_data) +migrate_pilot_db_key (const char *key, gpointer user_data) { EXmlHash *xmlhash = user_data; - e_xmlhash_add (xmlhash, key, data); + e_xmlhash_add (xmlhash, key, ""); } static void @@ -574,8 +574,8 @@ migrate_pilot_data (const char *component, const char *conduit, const char *old_ map = g_alloca (12 + strlen (conduit)); sprintf (map, "pilot-map-%s-", conduit); - changelog = g_alloca (strlen (component) + 28 + strlen (conduit)); - sprintf (changelog, "%s.ics-pilot-sync-evolution-%s-", component, conduit); + changelog = g_alloca (24 + strlen (conduit)); + sprintf (changelog, "pilot-sync-evolution-%s-", conduit); while ((dent = readdir (dir))) { if (!strncmp (dent->d_name, map, strlen (map)) && @@ -650,7 +650,7 @@ migrate_pilot_data (const char *component, const char *conduit, const char *old_ dbhash = e_dbhash_new (filename); g_free (filename); - filename = g_build_filename (new_path, dent->d_name, NULL); + filename = g_strdup_printf ("%s/%s.ics-%s", new_path, component, dent->d_name, NULL); if (stat (filename, &st) != -1) unlink (filename); xmlhash = e_xmlhash_new (filename); @@ -768,7 +768,7 @@ migrate_calendars (CalendarComponent *component, int major, int minor, int revis g_object_unref (gconf); } - if (minor < 5 || (minor == 5 && revision <= 9)) { + if (minor < 5 || (minor == 5 && revision <= 10)) { char *old_path, *new_path; old_path = g_build_filename (g_get_home_dir (), "evolution", "local", "Calendar", NULL); @@ -869,7 +869,7 @@ migrate_tasks (TasksComponent *component, int major, int minor, int revision) dialog_close (); } - if (minor < 5 || (minor == 5 && revision <= 9)) { + if (minor < 5 || (minor == 5 && revision <= 10)) { char *old_path, *new_path; old_path = g_build_filename (g_get_home_dir (), "evolution", "local", "Tasks", NULL); -- cgit