mirror of
https://github.com/tmux/tmux.git
synced 2025-09-01 04:27:00 +00:00
Do not add a trailing / if there is nothing to follow it, Johannes
Altmanninger in GitHub issue 4472.
This commit is contained in:
5
spawn.c
5
spawn.c
@ -231,8 +231,9 @@ spawn_pane(struct spawn_context *sc, char **cause)
|
||||
if (sc->cwd != NULL) {
|
||||
cwd = format_single(item, sc->cwd, c, target->s, NULL, NULL);
|
||||
if (*cwd != '/') {
|
||||
xasprintf(&new_cwd, "%s/%s", server_client_get_cwd(c,
|
||||
target->s), cwd);
|
||||
xasprintf(&new_cwd, "%s%s%s",
|
||||
server_client_get_cwd(c, target->s),
|
||||
*cwd != '\0' ? "/" : "", cwd);
|
||||
free(cwd);
|
||||
cwd = new_cwd;
|
||||
}
|
||||
|
Reference in New Issue
Block a user