diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2010-06-27 02:57:00 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2010-06-27 02:57:00 +0000 |
commit | b109c783d06f4af76ff573fa020fbe9d1d855f7b (patch) | |
tree | fb5b8ce39c74b686b7bd375bc614be54f75bd473 /usr.bin/tmux/session.c | |
parent | 30a46c2d76c094d24f6e4d5323c296dfd6b865dd (diff) |
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 'usr.bin/tmux/session.c')
-rw-r--r-- | usr.bin/tmux/session.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.bin/tmux/session.c b/usr.bin/tmux/session.c index 79c83881dd5..558e03f773e 100644 --- a/usr.bin/tmux/session.c +++ b/usr.bin/tmux/session.c @@ -1,4 +1,4 @@ -/* $OpenBSD: session.c,v 1.18 2010/06/21 01:27:46 nicm Exp $ */ +/* $OpenBSD: session.c,v 1.19 2010/06/27 02:56:59 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -68,6 +68,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); @@ -142,6 +144,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++) { |