diff options
author | Thomas Adam <thomas@xteddy.org> | 2018-05-24 13:02:29 +0100 |
---|---|---|
committer | Thomas Adam <thomas@xteddy.org> | 2018-05-24 13:02:29 +0100 |
commit | 7448b38327f856dae6ce915eae63f7f6c3f036e0 (patch) | |
tree | e38b2964d8261f2103f633b26995d5d2d38c7b94 /cmd-new-session.c | |
parent | 85d5a377c53d711ff923f1b5f9184f2f96c29c41 (diff) | |
parent | b9a6162d2f9bea63c3ad421e9c3969eea2852b00 (diff) | |
download | rtmux-7448b38327f856dae6ce915eae63f7f6c3f036e0.tar.gz rtmux-7448b38327f856dae6ce915eae63f7f6c3f036e0.tar.bz2 rtmux-7448b38327f856dae6ce915eae63f7f6c3f036e0.zip |
Merge branch 'obsd-master'
Diffstat (limited to 'cmd-new-session.c')
-rw-r--r-- | cmd-new-session.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/cmd-new-session.c b/cmd-new-session.c index 26cb08ba..7af67a11 100644 --- a/cmd-new-session.c +++ b/cmd-new-session.c @@ -156,10 +156,8 @@ cmd_new_session_exec(struct cmd *self, struct cmdq_item *item) /* Get the new session working directory. */ if ((tmp = args_get(args, 'c')) != NULL) cwd = format_single(item, tmp, c, NULL, NULL, NULL); - else if (c != NULL && c->session == NULL && c->cwd != NULL) - cwd = xstrdup(c->cwd); else - cwd = xstrdup("."); + cwd = xstrdup(server_client_get_cwd(c, NULL)); /* * If this is a new client, check for nesting and save the termios |