diff options
author | Jeffrey Stedfast <fejj@ximian.com> | 2004-01-16 03:01:30 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2004-01-16 03:01:30 +0800 |
commit | 8fbb41b728784aa0b7672964f6d5304d82429b5c (patch) | |
tree | 7f322f8e39055fe01578235ed40ac51736d39b3e | |
parent | b3fe89ecf60c8beb7778490f50425625b6c4744d (diff) | |
download | gsoc2013-evolution-8fbb41b728784aa0b7672964f6d5304d82429b5c.tar.gz gsoc2013-evolution-8fbb41b728784aa0b7672964f6d5304d82429b5c.tar.zst gsoc2013-evolution-8fbb41b728784aa0b7672964f6d5304d82429b5c.zip |
Only abort the copy if the dest folder both exists and contains data.
2004-01-15 Jeffrey Stedfast <fejj@ximian.com>
* 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.
svn path=/trunk/; revision=24251
-rw-r--r-- | mail/ChangeLog | 2 | ||||
-rw-r--r-- | mail/em-migrate.c | 11 |
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) { |