artulab
projects
/
openbsd
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0c0c258
)
O_TRUNC is needed in case file exists.
author
nicm
<nicm@openbsd.org>
Thu, 11 Feb 2021 09:03:38 +0000
(09:03 +0000)
committer
nicm
<nicm@openbsd.org>
Thu, 11 Feb 2021 09:03:38 +0000
(09:03 +0000)
usr.bin/tmux/cmd-save-buffer.c
patch
|
blob
|
history
diff --git
a/usr.bin/tmux/cmd-save-buffer.c
b/usr.bin/tmux/cmd-save-buffer.c
index
cb96812
..
96194a5
100644
(file)
--- a/
usr.bin/tmux/cmd-save-buffer.c
+++ b/
usr.bin/tmux/cmd-save-buffer.c
@@
-1,4
+1,4
@@
-/* $OpenBSD: cmd-save-buffer.c,v 1.5
1 2020/07/21 05:24:33
nicm Exp $ */
+/* $OpenBSD: cmd-save-buffer.c,v 1.5
2 2021/02/11 09:03:38
nicm Exp $ */
/*
* Copyright (c) 2009 Tiago Cunha <me@tiagocunha.org>
@@
-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);