merge r5755 from trunk
authorDana Jansens <danakj@orodu.net>
Tue, 24 Apr 2007 14:39:32 +0000 (14:39 +0000)
committerDana Jansens <danakj@orodu.net>
Tue, 24 Apr 2007 14:39:32 +0000 (14:39 +0000)
parser/parse.c

index 9b8924ca1a2586aa48863e4a03c7d8478fc9a9f8..011808fb0d3a8ab16656af775391eea1880db243 100644 (file)
@@ -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);