aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-component.c
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2004-01-14 06:45:47 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2004-01-14 06:45:47 +0800
commita131a710f92a7fd9e7e3ca913a0e26956d9f5d50 (patch)
treeb4ce49a6e5f6c03a97244d12e5a193429a771bcf /mail/mail-component.c
parentf17f36a31ed398d797cf96a9029efaaf83485f43 (diff)
downloadgsoc2013-evolution-a131a710f92a7fd9e7e3ca913a0e26956d9f5d50.tar.gz
gsoc2013-evolution-a131a710f92a7fd9e7e3ca913a0e26956d9f5d50.tar.zst
gsoc2013-evolution-a131a710f92a7fd9e7e3ca913a0e26956d9f5d50.zip
Handle upgrading from 1.0.x and 1.2.x (code basically moved verbatim from
2004-01-13 Jeffrey Stedfast <fejj@ximian.com> * em-migrate.c (em_migrate): Handle upgrading from 1.0.x and 1.2.x (code basically moved verbatim from e_config_upgrade). * mail-component.c (impl_upgradeFromVersion): Move all the major/minor/revision logic into em_migrate(). svn path=/trunk/; revision=24206
Diffstat (limited to 'mail/mail-component.c')
-rw-r--r--mail/mail-component.c20
1 files changed, 7 insertions, 13 deletions
diff --git a/mail/mail-component.c b/mail/mail-component.c
index 1faa15068d..1f01ef691b 100644
--- a/mail/mail-component.c
+++ b/mail/mail-component.c
@@ -481,24 +481,18 @@ impl_sendAndReceive (PortableServer_Servant servant, CORBA_Environment *ev)
static gboolean
impl_upgradeFromVersion (PortableServer_Servant servant, short major, short minor, short revision, CORBA_Environment *ev)
{
+ MailComponent *component;
CamelException ex;
- camel_exception_init (&ex);
+ component = mail_component_peek ();
- switch (major) {
- case 1:
- switch (minor) {
- case 0:
- case 2:
- case 4:
- em_migrate (mail_component_peek (), &ex);
- break;
- }
- break;
+ camel_exception_init (&ex);
+ if (em_migrate (component->priv->base_directory, major, minor, revision, &ex) == -1) {
+ /* FIXME: report errors? */
+ camel_exception_clear (&ex);
+ return FALSE;
}
- camel_exception_clear (&ex);
-
return TRUE;
}