summaryrefslogtreecommitdiff
path: root/engine
diff options
context:
space:
mode:
authorTing-Wei Lan <lantw@src.gnome.org>2017-12-22 21:45:38 +0800
committerTing-Wei Lan <lantw@src.gnome.org>2018-08-16 23:11:46 +0800
commit46574fcc54eba3ed4245f85d2725c6ea019b39be (patch)
treebcb09da74e5967becd68d2971cf812c83b84961e /engine
parenta28fd39f780bbd6098a4852696de1a432b1a61c1 (diff)
downloaddconf-46574fcc54eba3ed4245f85d2725c6ea019b39be.tar.gz
Replace all hard-coded /etc path with sysconfdirwip/lantw/dont-hard-code-etc
This is useful for JHBuild environments and systems that don't want to use /etc/dconf. https://bugzilla.gnome.org/show_bug.cgi?id=739299
Diffstat (limited to 'engine')
-rw-r--r--engine/dconf-engine-profile.c4
-rw-r--r--engine/dconf-engine-source-system.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/engine/dconf-engine-profile.c b/engine/dconf-engine-profile.c
index cc9f83f..b204bb4 100644
--- a/engine/dconf-engine-profile.c
+++ b/engine/dconf-engine-profile.c
@@ -189,12 +189,12 @@ static FILE *
dconf_engine_open_profile_file (const gchar *profile)
{
const gchar * const *xdg_data_dirs;
- const gchar *prefix = "/etc";
+ const gchar *prefix = SYSCONFDIR;
FILE *fp;
xdg_data_dirs = g_get_system_data_dirs ();
- /* First time through, we check "/etc", then we check XDG_DATA_DIRS,
+ /* First time through, we check SYSCONFDIR, then we check XDG_DATA_DIRS,
* in order. We stop looking as soon as we successfully open a file
* or in the case that we run out of XDG_DATA_DIRS.
*
diff --git a/engine/dconf-engine-source-system.c b/engine/dconf-engine-source-system.c
index d9e7de8..0d7c2d8 100644
--- a/engine/dconf-engine-source-system.c
+++ b/engine/dconf-engine-source-system.c
@@ -47,7 +47,7 @@ dconf_engine_source_system_reopen (DConfEngineSource *source)
GvdbTable *table;
gchar *filename;
- filename = g_build_filename ("/etc/dconf/db", source->name, NULL);
+ filename = g_build_filename (SYSCONFDIR "/dconf/db", source->name, NULL);
table = gvdb_table_new (filename, FALSE, &error);
if (table == NULL)