dont do the same thing 100 times

This commit is contained in:
Dana Jansens 2007-04-21 22:16:24 +00:00
parent 78d7250098
commit da04050c9a

View file

@ -87,11 +87,12 @@ gboolean parse_load_rc(const gchar *file, xmlDocPtr *doc, xmlNodePtr *root,
*fileused = NULL; *fileused = NULL;
for (it = xdg_config_dir_paths; !r && it; it = g_slist_next(it)) { if (file) {
if (file) { if ((r = parse_load(file, "openbox_config", doc, root)))
if ((r = parse_load(file, "openbox_config", doc, root))) *fileused = g_strdup(file);
*fileused = g_strdup(file); } else {
} 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; gchar *path;
path = g_build_filename(it->data, "openbox", "rc.xml", NULL); path = g_build_filename(it->data, "openbox", "rc.xml", NULL);