diff options
author | Thomas Adam <thomas@xteddy.org> | 2015-10-31 10:01:12 +0000 |
---|---|---|
committer | Thomas Adam <thomas@xteddy.org> | 2015-10-31 10:01:12 +0000 |
commit | 17f6c3be8eeb0b67d07f916026dab918795c0317 (patch) | |
tree | 08a10a780a8de977d4452c10a7a9c03db1ae1702 /client.c | |
parent | e8bb385d6d9d8a91b5fa78e906531afc02320b80 (diff) | |
parent | 01defc9f4965bb174e1d1295754d5a8695683054 (diff) | |
download | rtmux-17f6c3be8eeb0b67d07f916026dab918795c0317.tar.gz rtmux-17f6c3be8eeb0b67d07f916026dab918795c0317.tar.bz2 rtmux-17f6c3be8eeb0b67d07f916026dab918795c0317.zip |
Merge branch 'obsd-master'
Diffstat (limited to 'client.c')
-rw-r--r-- | client.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -272,8 +272,10 @@ client_main(struct event_base *base, int argc, char **argv, int flags) client_peer = proc_add_peer(client_proc, fd, client_dispatch, NULL); /* Save these before pledge(). */ - if ((cwd = getcwd(path, sizeof path)) == NULL) - cwd = "/"; + if ((cwd = getcwd(path, sizeof path)) == NULL) { + if ((cwd = find_home()) == NULL) + cwd = "/"; + } if ((ttynam = ttyname(STDIN_FILENO)) == NULL) ttynam = ""; |