summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan Lortie <desrt@desrt.ca>2012-03-03 20:23:50 -0500
committerRyan Lortie <desrt@desrt.ca>2012-03-03 20:23:50 -0500
commit5efe08b3f9bad565b654034c139f2ca74d89e2fd (patch)
tree7790010633d5ca9d0790631ad315717cd8543c79
parentee1e3147952eb9a6cfbce807c2266c447e21438a (diff)
downloaddconf-5efe08b3f9bad565b654034c139f2ca74d89e2fd.tar.gz
engine: support absolute paths in DCONF_PROFILE
-rw-r--r--engine/dconf-engine.c7
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)