mirror of
https://github.com/tmux/tmux.git
synced 2025-01-12 03:08:46 +00:00
O_TRUNC is needed in case file exists.
This commit is contained in:
parent
e40831a002
commit
79e1984962
@ -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);
|
||||||
|
Loading…
Reference in New Issue
Block a user