Use starting client cwd in config file, GitHub issue 1606.

This commit is contained in:
nicm
2019-02-16 11:42:08 +00:00
parent f9c396db41
commit 82f0c859a2
3 changed files with 5 additions and 1 deletions

3
cfg.c
View File

@ -38,6 +38,7 @@ struct cfg_cond {
};
TAILQ_HEAD(cfg_conds, cfg_cond);
struct client *cfg_client;
static char *cfg_file;
int cfg_finished;
static char **cfg_causes;
@ -95,7 +96,7 @@ start_cfg(void)
* command queue is currently empty and our callback will be at the
* front - we need to get in before MSG_COMMAND.
*/
c = TAILQ_FIRST(&clients);
cfg_client = c = TAILQ_FIRST(&clients);
if (c != NULL) {
cfg_item = cmdq_get_callback(cfg_client_done, NULL);
cmdq_append(c, cfg_item);