diff options
author | Ryan Lortie <desrt@desrt.ca> | 2012-03-03 20:23:50 -0500 |
---|---|---|
committer | Ryan Lortie <desrt@desrt.ca> | 2012-03-03 20:23:50 -0500 |
commit | 5efe08b3f9bad565b654034c139f2ca74d89e2fd (patch) | |
tree | 7790010633d5ca9d0790631ad315717cd8543c79 /engine/dconf-engine.c | |
parent | ee1e3147952eb9a6cfbce807c2266c447e21438a (diff) | |
download | dconf-5efe08b3f9bad565b654034c139f2ca74d89e2fd.tar.gz |
engine: support absolute paths in DCONF_PROFILE
Diffstat (limited to 'engine/dconf-engine.c')
-rw-r--r-- | 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) |