aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2004-04-28 04:14:37 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2004-04-28 04:14:37 +0800
commit4cbd8086782526f61d335c2b5ea767b5f997566e (patch)
treeaaf759a85d077adf36ce64f8baabb18a950880fe /calendar/gui
parent21bf9d7a5563d5274554496f855d6ec154da3c89 (diff)
downloadgsoc2013-evolution-4cbd8086782526f61d335c2b5ea767b5f997566e.tar.gz
gsoc2013-evolution-4cbd8086782526f61d335c2b5ea767b5f997566e.tar.zst
gsoc2013-evolution-4cbd8086782526f61d335c2b5ea767b5f997566e.zip
Fixed the version checks for migrating pilot data. (migrate_calendars):
2004-04-27 Jeffrey Stedfast <fejj@ximian.com> * 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
Diffstat (limited to 'calendar/gui')
-rw-r--r--calendar/gui/migration.c14
1 files changed, 7 insertions, 7 deletions
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);