Update of /cvsroot/tmux/tmux
In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv31578
Modified Files:
cmd-rename-session.c
Log Message:
Sync OpenBSD patchset 749:
Do not allow duplicate session names to be created, reported by Dominik
Honnef, patch from Thomas Adam.
Index: cmd-rename-session.c
===================================================================
RCS file: /cvsroot/tmux/tmux/cmd-rename-session.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- cmd-rename-session.c 14 Nov 2009 17:56:39 -0000 1.19
+++ cmd-rename-session.c 11 Aug 2010 22:19:03 -0000 1.20
@@ -45,6 +45,11 @@
struct cmd_target_data *data = self->data;
struct session *s;
+ if (data->arg != NULL && session_find(data->arg) != NULL) {
+ ctx->error(ctx, "duplicate session: %s", data->arg);
+ return (-1);
+ }
+
if ((s = cmd_find_session(ctx, data->target)) == NULL)
return (-1);
------------------------------------------------------------------------------
This SF.net email is sponsored by
Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev
_______________________________________________
tmux-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tmux-cvs