aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/gui/component/addressbook-migrate.c
diff options
context:
space:
mode:
Diffstat (limited to 'addressbook/gui/component/addressbook-migrate.c')
-rw-r--r--addressbook/gui/component/addressbook-migrate.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/addressbook/gui/component/addressbook-migrate.c b/addressbook/gui/component/addressbook-migrate.c
index ac6e9cfac5..6492e1abbe 100644
--- a/addressbook/gui/component/addressbook-migrate.c
+++ b/addressbook/gui/component/addressbook-migrate.c
@@ -336,8 +336,16 @@ migrate_contacts (MigrationContext *context, EBook *old_book, EBook *new_book)
of attributes, so we need to go through and
escape those ';'s. */
else if (!strcmp ("EMAIL", e_vcard_attribute_get_name (a))) {
+ GList *params;
GList *v = e_vcard_attribute_get_values (a);
+ /* Add TYPE=OTHER if there is no type set */
+ params = e_vcard_attribute_get_params (a);
+ if (!params)
+ e_vcard_attribute_add_param_with_value (a,
+ e_vcard_attribute_param_new (EVC_TYPE),
+ "OTHER");
+
if (v && v->data) {
if (!strncmp ((char*)v->data, "<?xml", 5)) {
/* k, this is the nasty part. we glomb all the