Ensure that when -F is passed, existing files are truncated properly.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
This commit is contained in:
		@@ -61,7 +61,7 @@ do_check(char *path, uid_t uid, gid_t gid, mode_t mode, inode_t type, bool trunc
 | 
			
		||||
	struct stat st;
 | 
			
		||||
	int fd, flags;
 | 
			
		||||
 | 
			
		||||
	if (stat(path, &st)) {
 | 
			
		||||
	if (stat(path, &st) || trunc) {
 | 
			
		||||
		if (type == inode_file) {
 | 
			
		||||
			einfo("%s: creating file", path);
 | 
			
		||||
			if (!mode) /* 664 */
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user