aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
Diffstat (limited to 'mail')
-rw-r--r--mail/ChangeLog2
-rw-r--r--mail/em-migrate.c11
2 files changed, 11 insertions, 2 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 2c4d09c427..c8154d170d 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -2,6 +2,8 @@
* em-migrate.c (cp): Only abort the copy if the dest folder both
exists and contains data. Fixes bug #52880.
+ (em_migrate): Abort if config.xmldb cannot be loaded. Fixes bug
+ #52886.
2004-01-15 Rodrigo Moya <rodrigo@ximian.com>
diff --git a/mail/em-migrate.c b/mail/em-migrate.c
index ccb4fedfe3..05f4a58cec 100644
--- a/mail/em-migrate.c
+++ b/mail/em-migrate.c
@@ -1868,10 +1868,17 @@ em_migrate (const char *evolution_dir, int major, int minor, int revision, Camel
xmlDocPtr config_xmldb = NULL, filters, vfolders;
path = g_build_filename (g_get_home_dir (), "evolution", NULL);
+ if (minor <= 2 && !(config_xmldb = emm_load_xml (path, "config.xmldb"))) {
+ camel_exception_set (ex, CAMEL_EXCEPTION_SYSTEM,
+ "Cannot migrate mail settings/data from Evolution %d.%d.%d: "
+ "~/evolution/config.xmldb doesn't exist or is corrupt!");
+ g_warning ("Cannot migrate mail settings/data from Evolution %d.%d.%d: "
+ "~/evolution/config.xmldb doesn't exist or is corrupt!");
+ g_free (path);
+ return -1;
+ }
filters = emm_load_xml (path, "filters.xml");
vfolders = emm_load_xml (path, "vfolders.xml");
- if (minor <= 2)
- config_xmldb = emm_load_xml (path, "config.xmldb");
g_free (path);
if (minor == 0) {