summaryrefslogtreecommitdiffstats
path: root/usr.bin/tmux/cmd.c
diff options
context:
space:
mode:
authornicm <nicm@openbsd.org>2012-02-06 17:29:29 +0000
committernicm <nicm@openbsd.org>2012-02-06 17:29:29 +0000
commit89f4327f62af82bd4cc9d884463ec884987eb8f8 (patch)
tree27a31485165131b4b9c88bda9318778fa772d30e /usr.bin/tmux/cmd.c
parentdon't abort if that info is not yet available... (diff)
downloadwireguard-openbsd-89f4327f62af82bd4cc9d884463ec884987eb8f8.tar.xz
wireguard-openbsd-89f4327f62af82bd4cc9d884463ec884987eb8f8.zip
Don't die if fail to get root directory, from Ben Boeckel.
Diffstat (limited to 'usr.bin/tmux/cmd.c')
-rw-r--r--usr.bin/tmux/cmd.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.bin/tmux/cmd.c b/usr.bin/tmux/cmd.c
index 6352b340180..183a5e1588e 100644
--- a/usr.bin/tmux/cmd.c
+++ b/usr.bin/tmux/cmd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd.c,v 1.61 2012/01/31 15:52:21 nicm Exp $ */
+/* $OpenBSD: cmd.c,v 1.62 2012/02/06 17:29:29 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -1309,7 +1309,8 @@ cmd_get_default_path(struct cmd_ctx *ctx, const char *cwd)
else
return (s->cwd);
skip = 0;
- goto complete_path;
+ if (root != NULL)
+ goto complete_path;
}
return (s->cwd);