[folks] eds: Fix potential false matches in _is_in_source_list()



commit d1bfbfc0775a3b91515de3e31095df3f7def1e08
Author: Philip Withnall <philip tecnocode co uk>
Date:   Sun Sep 18 18:24:50 2011 +0100

    eds: Fix potential false matches in _is_in_source_list()
    
    It's possible for the relative URIs of two ESources to be equal (though it's
    unlikely). Consequently, we need to compare by UID as well.

 backends/eds/lib/edsf-persona-store.vala |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/backends/eds/lib/edsf-persona-store.vala b/backends/eds/lib/edsf-persona-store.vala
index 2327f6c..d1febb3 100644
--- a/backends/eds/lib/edsf-persona-store.vala
+++ b/backends/eds/lib/edsf-persona-store.vala
@@ -1878,7 +1878,8 @@ public class Edsf.PersonaStore : Folks.PersonaStore
         {
           foreach (var s in g.peek_sources ())
             {
-              if (s.peek_relative_uri () == this.id)
+              if (s.peek_relative_uri () == this.id &&
+                  s.peek_uid () == this._addressbook.get_source ().peek_uid ())
                 {
                   /* We've found ourself. */
                   return true;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]