1
0
mirror of https://github.com/tmux/tmux.git synced 2025-03-31 12:38:48 +00:00

Merge branch 'obsd-master'

This commit is contained in:
Thomas Adam 2022-08-10 18:01:11 +01:00
commit 9abf5d9fe5

View File

@ -389,7 +389,7 @@ spawn_pane(struct spawn_context *sc, char **cause)
*/
if (chdir(new_wp->cwd) == 0)
environ_set(child, "PWD", 0, "%s", new_wp->cwd);
else if ((tmp = find_home()) != NULL || chdir(tmp) == 0)
else if ((tmp = find_home()) != NULL && chdir(tmp) == 0)
environ_set(child, "PWD", 0, "%s", tmp);
else if (chdir("/") == 0)
environ_set(child, "PWD", 0, "/");