diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2012-05-01 08:03:59 +0200 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2012-05-03 10:31:38 +0200 |
commit | feede0321632b664a981d3df223d7a3724242f5b (patch) | |
tree | 699789eef1e45390c17818e55a7ebed20e7a592f | |
parent | 79f7983759a7d6b8527f31f3ecaa8f9b2e5e0525 (diff) | |
download | folks-0-6.tar.gz |
persona-store-cache: don't create empty field detailsfolks-0-6
https://bugzilla.gnome.org/show_bug.cgi?id=675211
-rw-r--r-- | backends/telepathy/lib/tpf-persona-store-cache.vala | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/backends/telepathy/lib/tpf-persona-store-cache.vala b/backends/telepathy/lib/tpf-persona-store-cache.vala index 792bef72..bd3321b8 100644 --- a/backends/telepathy/lib/tpf-persona-store-cache.vala +++ b/backends/telepathy/lib/tpf-persona-store-cache.vala @@ -331,20 +331,31 @@ internal class Tpf.PersonaStoreCache : Folks.ObjectCache<Tpf.Persona> if (object_version == 2) { + /* Make sure that the extracted value is not empty as caches created + * before bgo#675144 was fixed may have stored empty values. */ this.deserialise_abstract_field_details (variant.get_child_value (12), (v, p) => { - email_address_set.add (new EmailFieldDetails (v, p)); + if (v != "") + { + email_address_set.add (new EmailFieldDetails (v, p)); + } }); this.deserialise_abstract_field_details (variant.get_child_value (13), (v, p) => { - phone_number_set.add (new PhoneFieldDetails (v, p)); + if (v != "") + { + phone_number_set.add (new PhoneFieldDetails (v, p)); + } }); this.deserialise_abstract_field_details (variant.get_child_value (14), (v, p) => { - url_set.add (new UrlFieldDetails (v, p)); + if (v != "") + { + url_set.add (new UrlFieldDetails (v, p)); + } }); } |