summaryrefslogtreecommitdiffstats
path: root/cmd-save-buffer.c
diff options
context:
space:
mode:
authorThomas Adam <thomas@xteddy.org>2021-02-17 09:58:12 +0000
committerThomas Adam <thomas@xteddy.org>2021-02-17 09:58:12 +0000
commitce5de765929ea38b68e3fd6c26e554ab0c1e09b1 (patch)
treec4f54994379a0f590ecf0183aeeb373af7be2ef9 /cmd-save-buffer.c
parent0526d074d0170ad248b06187b64f4e44a0c05dcc (diff)
parentd768fc2553c2bdec6bb7b026ffffdaee0dd102f4 (diff)
Merge branch 'obsd-master' into master
Diffstat (limited to 'cmd-save-buffer.c')
-rw-r--r--cmd-save-buffer.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmd-save-buffer.c b/cmd-save-buffer.c
index ef02c202..7faea926 100644
--- a/cmd-save-buffer.c
+++ b/cmd-save-buffer.c
@@ -108,7 +108,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);