diff options
Diffstat (limited to 'cmd-new-session.c')
-rw-r--r-- | cmd-new-session.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cmd-new-session.c b/cmd-new-session.c index 291107bc..357ffed1 100644 --- a/cmd-new-session.c +++ b/cmd-new-session.c @@ -142,7 +142,7 @@ cmd_new_session_exec(struct cmd *self, struct cmd_q *cmdq) format_defaults(ft, c, NULL, NULL, NULL); to_free = cwd = format_expand(ft, args_get(args, 'c')); format_free(ft); - } else if (c != NULL && c->session == NULL) + } else if (c != NULL && c->session == NULL && c->cwd != NULL) cwd = c->cwd; else cwd = "."; |