[gnome-online-accounts/wip/rishi/templates: 4/8] daemon: Use the instance variable to construct the parent's path
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-online-accounts/wip/rishi/templates: 4/8] daemon: Use the instance variable to construct the parent's path
- Date: Thu, 1 Sep 2016 18:21:29 +0000 (UTC)
commit 65bd25392037eda532f9dc31f3c97344f7aa69ba
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
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]