Dont return an error if the directory already existed
This commit is contained in:
		@@ -57,8 +57,12 @@ int make_directory (char *path, long mode, int flags)
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
	ret = mkdir(path, mode);
 | 
			
		||||
	if ( (ret == -1) && (errno != EEXIST) ) {
 | 
			
		||||
		perror_msg("Cannot create directory %s", path);
 | 
			
		||||
	if (ret == -1) {
 | 
			
		||||
		if (errno == EEXIST) {
 | 
			
		||||
			ret = 0;
 | 
			
		||||
		} else {
 | 
			
		||||
			perror_msg("Cannot create directory %s", path);
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
	return ret;
 | 
			
		||||
	return(ret);
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user