diff options
-rw-r--r-- | sway/config.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sway/config.c b/sway/config.c index 46322374..8bc65857 100644 --- a/sway/config.c +++ b/sway/config.c | |||
@@ -316,7 +316,8 @@ static char *get_config_path(void) { | |||
316 | SYSCONFDIR "/i3/config", | 316 | SYSCONFDIR "/i3/config", |
317 | }; | 317 | }; |
318 | 318 | ||
319 | if (!getenv("XDG_CONFIG_HOME")) { | 319 | char *curr_config_home = getenv("XDG_CONFIG_HOME"); |
320 | if (!curr_config_home || !*curr_config_home) { | ||
320 | char *home = getenv("HOME"); | 321 | char *home = getenv("HOME"); |
321 | char *config_home = malloc(strlen(home) + strlen("/.config") + 1); | 322 | char *config_home = malloc(strlen(home) + strlen("/.config") + 1); |
322 | if (!config_home) { | 323 | if (!config_home) { |