mirror of
				https://github.com/neovim/neovim.git
				synced 2025-10-26 12:27:24 +00:00 
			
		
		
		
	stdpaths_get_xdg_var: consider empty env vars #10953
Without this "sysinit uses VIM if XDG_CONFIG_DIRS unset" fails with an
existing `/etc/xdg/nvim/sysinit.vim` file, because `XDG_CONFIG_DIRS=` is
not considered, but the default ("/etc/xdg") used then.
			
			
This commit is contained in:
		 Daniel Hahler
					Daniel Hahler
				
			
				
					committed by
					
						 Justin M. Keyes
						Justin M. Keyes
					
				
			
			
				
	
			
			
			 Justin M. Keyes
						Justin M. Keyes
					
				
			
						parent
						
							fecbafb29e
						
					
				
				
					commit
					64caeb13e6
				
			| @@ -68,6 +68,10 @@ char *stdpaths_get_xdg_var(const XDGVarType idx) | ||||
|   if (env_val == NULL && xdg_defaults_env_vars[idx] != NULL) { | ||||
|     env_val = os_getenv(xdg_defaults_env_vars[idx]); | ||||
|   } | ||||
| #else | ||||
|   if (env_val == NULL && os_env_exists(env)) { | ||||
|     env_val = ""; | ||||
|   } | ||||
| #endif | ||||
|  | ||||
|   char *ret = NULL; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user