diff options
author | Tiago Cunha <tcunha@gmx.com> | 2010-07-02 02:49:19 +0000 |
---|---|---|
committer | Tiago Cunha <tcunha@gmx.com> | 2010-07-02 02:49:19 +0000 |
commit | 63e76b555d8f3d40f9905fb65a58f6e7509d399d (patch) | |
tree | b9b003f298a235899b3d7aa03014d0f27bff13cd /session.c | |
parent | 13e7f060b1819ecdb1fcf88eee56293aa8b9f4cf (diff) | |
download | rtmux-63e76b555d8f3d40f9905fb65a58f6e7509d399d.tar.gz rtmux-63e76b555d8f3d40f9905fb65a58f6e7509d399d.tar.bz2 rtmux-63e76b555d8f3d40f9905fb65a58f6e7509d399d.zip |
Sync OpenBSD patchset 730:
Store the current working directory in the session, change the default-path
option to default to empty and make that mean that the stored session CWD is
used.
Diffstat (limited to 'session.c')
-rw-r--r-- | session.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -1,4 +1,4 @@ -/* $Id: session.c,v 1.76 2010-06-22 23:26:18 tcunha Exp $ */ +/* $Id: session.c,v 1.77 2010-07-02 02:49:19 tcunha Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -67,6 +67,8 @@ session_create(const char *name, const char *cmd, const char *cwd, fatal("gettimeofday failed"); memcpy(&s->activity_time, &s->creation_time, sizeof s->activity_time); + s->cwd = xstrdup(cwd); + s->curw = NULL; TAILQ_INIT(&s->lastw); RB_INIT(&s->windows); @@ -141,6 +143,7 @@ session_destroy(struct session *s) while (!RB_EMPTY(&s->windows)) winlink_remove(&s->windows, RB_ROOT(&s->windows)); + xfree(s->cwd); xfree(s->name); for (i = 0; i < ARRAY_LENGTH(&dead_sessions); i++) { |