summaryrefslogtreecommitdiff
path: root/usr.bin/tmux/cmd-new-session.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2015-10-31 14:51:16 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2015-10-31 14:51:16 +0000
commit394736931b2b2686fe932cda0157e8adf1363365 (patch)
tree4b1e1c13804852cbca6ef641bf97cf0061b18766 /usr.bin/tmux/cmd-new-session.c
parent0c2f3fa14b7dba1601821d1e7d9bab203a1b40bd (diff)
Fall back silently to ~ or / rather than checking -c with access(), this
was the old behaviour.
Diffstat (limited to 'usr.bin/tmux/cmd-new-session.c')
-rw-r--r--usr.bin/tmux/cmd-new-session.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/usr.bin/tmux/cmd-new-session.c b/usr.bin/tmux/cmd-new-session.c
index 6ca91bd404e..563a536f5dc 100644
--- a/usr.bin/tmux/cmd-new-session.c
+++ b/usr.bin/tmux/cmd-new-session.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-new-session.c,v 1.76 2015/10/31 08:13:58 nicm Exp $ */
+/* $OpenBSD: cmd-new-session.c,v 1.77 2015/10/31 14:51:15 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -124,13 +124,6 @@ cmd_new_session_exec(struct cmd *self, struct cmd_q *cmdq)
NULL);
to_free = cwd = format_expand(ft, args_get(args, 'c'));
format_free(ft);
-
- if (access(cwd, X_OK) != 0) {
- free((void *)cwd);
- cmdq_error(cmdq, "bad working directory: %s",
- strerror(errno));
- return (CMD_RETURN_ERROR);
- }
} else if (c != NULL && c->session == NULL)
cwd = c->cwd;
else if ((c0 = cmd_find_client(cmdq, NULL, 1)) != NULL)