From 4cc0d9b72d4bb084e6736c60319fd8e2ab92ef6a Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Sat, 22 Mar 2003 22:51:27 +0000 Subject: [PATCH] only load the system rc if the user rc didnt load --- openbox/config.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/openbox/config.c b/openbox/config.c index 3f3c70c1..b9c24ded 100644 --- a/openbox/config.c +++ b/openbox/config.c @@ -44,22 +44,26 @@ void config_parse() { FILE *file; char *path; + gboolean load = FALSE; - /* load the system wide rc file first */ - path = g_build_filename(RCDIR, "rc3", NULL); + /* load the user rc */ + path = g_build_filename(g_get_home_dir(), ".openbox", "rc3", NULL); if ((file = fopen(path, "r")) != NULL) { cparse_go(path, file); fclose(file); + load = TRUE; } g_free(path); + g_free(path); - /* then load the user one which can override it */ - path = g_build_filename(g_get_home_dir(), ".openbox", "rc3", NULL); - if ((file = fopen(path, "r")) != NULL) { - cparse_go(path, file); - fclose(file); + if (!load) { + /* load the system wide rc */ + path = g_build_filename(RCDIR, "rc3", NULL); + if ((file = fopen(path, "r")) != NULL) { + cparse_go(path, file); + fclose(file); + } } - g_free(path); } gboolean config_set(char *name, ConfigValueType type, ConfigValue value) -- 2.39.2