dont do the same thing 100 times
This commit is contained in:
parent
78d7250098
commit
da04050c9a
1 changed files with 6 additions and 5 deletions
|
@ -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);
|
||||||
|
|
Loading…
Reference in a new issue