*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);
if (path && path[0] != '\0') /* not unset or empty */
xdg_config_dir_paths = split_paths(path);
else {
+ xdg_config_dir_paths = slist_path_add(xdg_config_dir_paths,
+ g_strdup(CONFIGDIR),
+ (GSListFunc) g_slist_append);
xdg_config_dir_paths = slist_path_add(xdg_config_dir_paths,
g_build_filename
(G_DIR_SEPARATOR_S,
"etc", "xdg", NULL),
(GSListFunc) g_slist_append);
- xdg_config_dir_paths = slist_path_add(xdg_config_dir_paths,
- g_strdup(CONFIGDIR),
- (GSListFunc) g_slist_append);
}
xdg_config_dir_paths = slist_path_add(xdg_config_dir_paths,
g_strdup(xdg_config_home_path),