summaryrefslogtreecommitdiff
path: root/parser/parse.c
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2007-04-21 22:16:24 +0000
committerDana Jansens <danakj@orodu.net>2007-04-21 22:16:24 +0000
commitda04050c9a539ba93e29ad8e4c5d104386b27989 (patch)
tree4d67c72db1a8407e579a75ab74a9ac5793ee3c84 /parser/parse.c
parent78d725009812d3aed87024264f0112ca9968519a (diff)
dont do the same thing 100 times
Diffstat (limited to 'parser/parse.c')
-rw-r--r--parser/parse.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/parser/parse.c b/parser/parse.c
index 552221ca..63d53ce7 100644
--- a/parser/parse.c
+++ b/parser/parse.c
@@ -87,11 +87,12 @@ gboolean parse_load_rc(const gchar *file, xmlDocPtr *doc, xmlNodePtr *root,
*fileused = NULL;
- for (it = xdg_config_dir_paths; !r && it; it = g_slist_next(it)) {
- if (file) {
- if ((r = parse_load(file, "openbox_config", doc, root)))
- *fileused = g_strdup(file);
- } else {
+ if (file) {
+ if ((r = parse_load(file, "openbox_config", doc, root)))
+ *fileused = g_strdup(file);
+ } else {
+ /* this won't run if the above code loaded a config */
+ for (it = xdg_config_dir_paths; !r && it; it = g_slist_next(it)) {
gchar *path;
path = g_build_filename(it->data, "openbox", "rc.xml", NULL);