diff options
author | nicm <nicm> | 2022-08-10 14:03:59 +0000 |
---|---|---|
committer | nicm <nicm> | 2022-08-10 14:03:59 +0000 |
commit | 273577ba0a88c8a373bc8a2ded7e6a08b82114d0 (patch) | |
tree | d18b8f7847c9275a64d40a673c7426b973817478 /spawn.c | |
parent | de5cd54124e37672adfdfe0229712e7e74acc9b0 (diff) |
Fix check of home directory (&& not ||), from Markus F X J Oberhumer,
GitHub issue 3297.
Diffstat (limited to 'spawn.c')
-rw-r--r-- | spawn.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -391,7 +391,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, "/"); |