summaryrefslogtreecommitdiffstats
path: root/cfg.c
diff options
context:
space:
mode:
authornicm <nicm>2019-02-16 11:42:08 +0000
committernicm <nicm>2019-02-16 11:42:08 +0000
commit82f0c859a2bcdfac79d242793b7720b74d62d04b (patch)
tree7deb3ba396767e0b720e3a7a7f7f6f419607b0b7 /cfg.c
parentf9c396db41927cd57d7c868c1b8c173cdce95b26 (diff)
Use starting client cwd in config file, GitHub issue 1606.
Diffstat (limited to 'cfg.c')
-rw-r--r--cfg.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/cfg.c b/cfg.c
index a448c4b1..9cbb9c2a 100644
--- a/cfg.c
+++ b/cfg.c
@@ -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);