[gnome-online-accounts] daemon: Use the instance variable to construct the parent's path



commit 56ed62d3e1cc2e504a5fd9ff3129f5d4eb4b4a46
Author: Debarshi Ray <debarshir gnome org>
Date:   Thu Sep 1 18:39:52 2016 +0200

    daemon: Use the instance variable to construct the parent's path
    
    https://bugzilla.gnome.org/show_bug.cgi?id=771366

 src/daemon/goadaemon.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/src/daemon/goadaemon.c b/src/daemon/goadaemon.c
index bcd2f5b..321292d 100644
--- a/src/daemon/goadaemon.c
+++ b/src/daemon/goadaemon.c
@@ -308,8 +308,10 @@ goa_daemon_init (GoaDaemon *self)
   g_dbus_object_manager_server_export (self->object_manager, G_DBUS_OBJECT_SKELETON (object));
   g_object_unref (object);
 
+  self->home_conf_file_path = g_strdup_printf ("%s/goa-1.0/accounts.conf", g_get_user_config_dir ());
+
   /* create ~/.config/goa-1.0 directory */
-  path = g_strdup_printf ("%s/goa-1.0", g_get_user_config_dir ());
+  path = g_path_get_dirname (self->home_conf_file_path);
   if (g_mkdir_with_parents (path, 0755) != 0)
     {
       g_warning ("Error creating directory %s: %s", path, strerror (errno));
@@ -317,7 +319,6 @@ goa_daemon_init (GoaDaemon *self)
   g_free (path);
 
   /* set up file monitoring */
-  self->home_conf_file_path = g_strdup_printf ("%s/goa-1.0/accounts.conf", g_get_user_config_dir ());
   self->home_conf_file_monitor = create_monitor (self->home_conf_file_path, FALSE);
   if (self->home_conf_file_monitor != NULL)
     g_signal_connect (self->home_conf_file_monitor, "changed", G_CALLBACK (on_file_monitor_changed), self);


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