[gnome-online-accounts] daemon: Ensure temporary accounts are really removed from the keyring



commit e1063162e65d5b461d9a6ebd6118cbb0f9172bd1
Author: Debarshi Ray <debarshir gnome org>
Date:   Mon Jul 18 15:01:06 2016 +0200

    daemon: Ensure temporary accounts are really removed from the keyring
    
    We should remove the GKeyFile group only after we have read everything
    that we need from it. Otherwise, it will lead to:
      goa-daemon-WARNING **: Unsupported account type (null) for ID
        account_1466692958_0 (no provider)
    
    Fall out from 56c056df2b5e3bc7f44dbc0915fa431db7628d91
    
    https://bugzilla.gnome.org/show_bug.cgi?id=688041

 src/daemon/goadaemon.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/daemon/goadaemon.c b/src/daemon/goadaemon.c
index c2d4da3..b7cb639 100644
--- a/src/daemon/goadaemon.c
+++ b/src/daemon/goadaemon.c
@@ -513,8 +513,6 @@ add_config_file (GoaDaemon     *self,
                       g_debug ("ignoring account \"%s\" in file %s because it's stale",
                                groups[n], path);
 
-                      needs_update = g_key_file_remove_group (key_file, groups[n], NULL);
-
                       id = group_to_id (groups[n]);
                       if (id == NULL)
                         {
@@ -532,6 +530,8 @@ add_config_file (GoaDaemon     *self,
                           goto cleanup_and_continue;
                         }
 
+                      needs_update = g_key_file_remove_group (key_file, groups[n], NULL);
+
                       error = NULL;
                       if (!goa_utils_delete_credentials_for_id_sync (provider, id, NULL, &error))
                         {


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