From c46dc51c15bdb042181c88dd38fb064b424d1e51 Mon Sep 17 00:00:00 2001 From: Patrick Ohly Date: Thu, 7 Mar 2013 10:41:23 -0800 Subject: [PATCH] eas-daemon: fix eas_connection_forget_folders Dropping folders must also work when the key file has not been created yet. Setting up a fresh config failed otherwise after applying the "eas-daemon: workround folder sync when server loses state" patch. --- eas-daemon/libeas/eas-connection.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/eas-daemon/libeas/eas-connection.c b/eas-daemon/libeas/eas-connection.c index 1f6f576..ff2aa7c 100644 --- a/eas-daemon/libeas/eas-connection.c +++ b/eas-daemon/libeas/eas-connection.c @@ -2337,6 +2337,13 @@ eas_connection_forget_folders (EasConnection *self, GError **error) file = g_file_new_for_path (self->priv->folders_keyfile); g_file_delete(file, NULL, error); g_object_unref (file); + + /* + * It is not an error when deleting fails because the file did + * not exist in the first place. + */ + if (g_error_matches (*error, G_IO_ERROR, G_IO_ERROR_NOT_FOUND)) + g_clear_error (error); } void -- 1.7.10.4