mirror of
				https://github.com/tmux/tmux.git
				synced 2025-11-04 00:56: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'))
 | 
			
		||||
		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);
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user