If writing a file fails, propagate the error to the server via a new

message. Use a client flag rather than bumping the protocol version.
GitHub issue 5451.
This commit is contained in:
nicm
2026-08-17 07:56:56 +00:00
committed by tmux update bot
parent 9fdd04ae61
commit 1729bb8e8a
5 changed files with 86 additions and 25 deletions

View File

@@ -1,4 +1,4 @@
/* $OpenBSD: server-client.c,v 1.502 2026/08/04 11:18:22 nicm Exp $ */
/* $OpenBSD: server-client.c,v 1.503 2026/08/17 07:56:56 nicm Exp $ */
/*
* Copyright (c) 2009 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -2700,6 +2700,10 @@ server_client_dispatch(struct imsg *imsg, void *arg)
if (file_write_ready(&c->files, imsg) != 0)
goto bad;
break;
case MSG_WRITE_DONE:
if (file_write_done(&c->files, imsg) != 0)
goto bad;
break;
case MSG_READ:
if (file_read_data(&c->files, imsg) != 0)
goto bad;