mirror of
https://github.com/tmux/tmux.git
synced 2025-01-11 18:58:47 +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'))
|
||||
flags = O_APPEND;
|
||||
else
|
||||
flags = 0;
|
||||
flags = O_TRUNC;
|
||||
file_write(cmdq_get_client(item), path, flags, bufdata, bufsize,
|
||||
cmd_save_buffer_done, item);
|
||||
free(path);
|
||||
|
Loading…
Reference in New Issue
Block a user