mirror of
https://github.com/tmux/tmux.git
synced 2025-09-02 05:21:10 +00:00
O_TRUNC is needed in case file exists.
This commit is contained in:
@ -109,7 +109,7 @@ cmd_save_buffer_exec(struct cmd *self, struct cmdq_item *item)
|
|||||||
if (args_has(args, 'a'))
|
if (args_has(args, 'a'))
|
||||||
flags = O_APPEND;
|
flags = O_APPEND;
|
||||||
else
|
else
|
||||||
flags = 0;
|
flags = O_TRUNC;
|
||||||
file_write(cmdq_get_client(item), path, flags, bufdata, bufsize,
|
file_write(cmdq_get_client(item), path, flags, bufdata, bufsize,
|
||||||
cmd_save_buffer_done, item);
|
cmd_save_buffer_done, item);
|
||||||
free(path);
|
free(path);
|
||||||
|
Reference in New Issue
Block a user