diff options
author | Nicholas Marriott <nicholas.marriott@gmail.com> | 2009-01-10 19:37:35 +0000 |
---|---|---|
committer | Nicholas Marriott <nicholas.marriott@gmail.com> | 2009-01-10 19:37:35 +0000 |
commit | 4d711648263372e06928d1c495efb220c7b804d3 (patch) | |
tree | ba1fd7a3ce506332abad9d3e4101fd03b5e69b9d /client.c | |
parent | 88ab74ac20ad96771a9f06667da666bf85cd3f23 (diff) |
Pick up cwd from environment,.
Diffstat (limited to 'client.c')
-rw-r--r-- | client.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -1,4 +1,4 @@ -/* $Id: client.c,v 1.35 2008-09-09 22:16:36 nicm Exp $ */ +/* $Id: client.c,v 1.36 2009-01-10 19:37:35 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -99,6 +99,8 @@ retry: data.sx = ws.ws_col; data.sy = ws.ws_row; *data.tty = '\0'; + if (getcwd(data.cwd, sizeof data.cwd) == NULL) + *data.cwd = '\0'; if ((name = ttyname(STDIN_FILENO)) == NULL) fatal("ttyname failed"); |