mirror of
https://github.com/tmux/tmux.git
synced 2025-09-01 20:57:00 +00:00
Make server_client_get_cwd used (almost) everywhere we need to work out
the cwd, and do not fall back to "." as it is pretty useless. GitHub issue 1331.
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user