Pick up cwd from environment,.

This commit is contained in:
Nicholas Marriott
2009-01-10 19:37:35 +00:00
parent 88ab74ac20
commit 4d71164826
13 changed files with 86 additions and 40 deletions

View File

@ -1,4 +1,4 @@
/* $Id: server-msg.c,v 1.54 2009-01-07 22:57:03 nicm Exp $ */
/* $Id: server-msg.c,v 1.55 2009-01-10 19:37:35 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@ -183,6 +183,10 @@ server_msg_fn_identify(struct hdr *hdr, struct client *c)
c->sx = data.sx;
c->sy = data.sy;
c->cwd = NULL;
if (*data.cwd != '\0')
c->cwd = xstrdup(data.cwd);
data.tty[(sizeof data.tty) - 1] = '\0';
tty_init(&c->tty, data.tty, xstrdup(term));
if (data.flags & IDENTIFY_UTF8)