Reload the same config file specified in the command line.

Fixes: #346
This commit is contained in:
Fernando Tarlá Cardoso Lemos 2011-03-13 20:32:54 -03:00 committed by Michael Stapelberg
parent cdeb49127f
commit b8a716c370

View File

@ -1,5 +1,5 @@
/* /*
* vim:ts=8:expandtab * vim:ts=4:sw=4:expandtab
* *
* i3 - an improved dynamic tiling window manager * i3 - an improved dynamic tiling window manager
* *
@ -232,15 +232,22 @@ static char *get_config_path() {
* *
*/ */
static void parse_configuration(const char *override_configpath) { static void parse_configuration(const char *override_configpath) {
if (override_configpath != NULL) { static const char *saved_configpath = NULL;
parse_file(override_configpath);
return;
}
char *path = get_config_path(); if (override_configpath != NULL) {
DLOG("Parsing configfile %s\n", path); saved_configpath = override_configpath;
parse_file(path); parse_file(override_configpath);
free(path); return;
}
else if (saved_configpath != NULL) {
parse_file(saved_configpath);
return;
}
char *path = get_config_path();
DLOG("Parsing configfile %s\n", path);
parse_file(path);
free(path);
} }
/* /*