Merge branch 'obsd-master'

This commit is contained in:
Thomas Adam
2025-04-24 12:01:10 +01:00
2 changed files with 7 additions and 6 deletions

View File

@ -229,8 +229,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;
}