mirror of
				https://github.com/swaywm/sway.git
				synced 2025-11-03 09:01:43 -05:00 
			
		
		
		
	config: set $XDG_CONFIG_HOME if empty
Before, it was only set if it was not set, but it should also be done when empty.
This commit is contained in:
		
							parent
							
								
									9b41db32ec
								
							
						
					
					
						commit
						de66ed4beb
					
				
					 1 changed files with 2 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -316,7 +316,8 @@ static char *get_config_path(void) {
 | 
			
		|||
		SYSCONFDIR "/i3/config",
 | 
			
		||||
	};
 | 
			
		||||
 | 
			
		||||
	if (!getenv("XDG_CONFIG_HOME")) {
 | 
			
		||||
	char *curr_config_home = getenv("XDG_CONFIG_HOME");
 | 
			
		||||
	if (!curr_config_home || !*curr_config_home) {
 | 
			
		||||
		char *home = getenv("HOME");
 | 
			
		||||
		char *config_home = malloc(strlen(home) + strlen("/.config") + 1);
 | 
			
		||||
		if (!config_home) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue