summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2012-11-21 19:57:36 +0100
committerMilan Crha <mcrha@redhat.com>2012-11-21 19:57:36 +0100
commit367be5e50a75405ec4b025ab96d8c2de54615a70 (patch)
tree9a2c98644e5365a1f4d8b126ae6ed7f15b0feb7b
parent01a2e2d8b769f3ce1bbf2eba83afbea765711197 (diff)
downloadevolution-data-server-367be5e50a75405ec4b025ab96d8c2de54615a70.tar.gz
Bug #680201 - Backup restore doesn't migrate accounts from GConf
-rw-r--r--services/evolution-source-registry/evolution-source-registry.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/services/evolution-source-registry/evolution-source-registry.c b/services/evolution-source-registry/evolution-source-registry.c
index bc9681902..6aca8369e 100644
--- a/services/evolution-source-registry/evolution-source-registry.c
+++ b/services/evolution-source-registry/evolution-source-registry.c
@@ -87,7 +87,21 @@ reload:
g_object_unref (server);
if (exit_code == E_DBUS_SERVER_EXIT_RELOAD) {
+ const gchar *config_dir;
+ gchar *dirname;
+
g_print ("Reloading...\n");
+
+ /* It's possible the Reload is called after restore, where
+ the ~/.config/evolution/sources directory can be missing,
+ thus create it, because e_server_side_source_get_user_dir()
+ may have its static variable already set to non-NULL value.
+ */
+ config_dir = e_get_user_config_dir ();
+ dirname = g_build_filename (config_dir, "sources", NULL);
+ g_mkdir_with_parents (dirname, 0700);
+ g_free (dirname);
+
goto reload;
}