[dconf] engine: support absolute paths in DCONF_PROFILE
- From: Ryan Lortie <ryanl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [dconf] engine: support absolute paths in DCONF_PROFILE
- Date: Sun, 4 Mar 2012 01:24:06 +0000 (UTC)
commit 5efe08b3f9bad565b654034c139f2ca74d89e2fd
Author: Ryan Lortie <desrt desrt ca>
Date: Sat Mar 3 20:23:50 2012 -0500
engine: support absolute paths in DCONF_PROFILE
engine/dconf-engine.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/engine/dconf-engine.c b/engine/dconf-engine.c
index 58856c3..73853eb 100644
--- a/engine/dconf-engine.c
+++ b/engine/dconf-engine.c
@@ -223,7 +223,12 @@ dconf_engine_load_profile (const gchar *profile,
char line[80];
FILE *f;
- filename = g_build_filename ("/etc/dconf/profile", profile, NULL);
+ /* DCONF_PROFILE starting with '/' gives an absolute path to a profile */
+ if (profile[0] != '/')
+ filename = g_build_filename ("/etc/dconf/profile", profile, NULL);
+ else
+ filename = g_strdup (profile);
+
f = fopen (filename, "r");
if (f == NULL)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]