aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2015-08-15 21:14:59 -0400
committerDrew DeVault <sir@cmpwn.com>2015-08-15 21:14:59 -0400
commit5ed999b1101e5a5830461f56977950232a6c8106 (patch)
treecc8ffeb1d52d770548fd99a9d0b7bbef18f90ead
parent6cc8ea29e51b785a75b2f5e6242e76dc1804002c (diff)
parent64a971882a7b3925ed69399c7ea1dc8177f8e295 (diff)
Merge pull request #37 from Luminarys/master
Minor fix to config loading
-rw-r--r--sway/config.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/sway/config.c b/sway/config.c
index 4f576bb9..17a75fbf 100644
--- a/sway/config.c
+++ b/sway/config.c
@@ -76,7 +76,7 @@ static char* get_config_path() {
//Now fall back to i3 paths and try the same thing
name = "/.i3/config";
sway_log(L_DEBUG, "Trying to find config in ~/.i3/config");
- char *temp = malloc(strlen(home) + strlen(name) + 1);
+ temp = malloc(strlen(home) + strlen(name) + 1);
strcpy(temp, home);
strcat(temp, name);
if (exists(temp)) {
@@ -84,7 +84,6 @@ static char* get_config_path() {
}
sway_log(L_DEBUG, "Trying to find config in XDG_CONFIG_HOME/i3/config");
- char *xdg_config_home = getenv("XDG_CONFIG_HOME");
if (xdg_config_home == NULL) {
sway_log(L_DEBUG, "Falling back to ~/.config/i3/config");
name = "/.config/i3/config";
@@ -108,7 +107,6 @@ static char* get_config_path() {
}
sway_log(L_DEBUG, "Trying to find config in XDG_CONFIG_DIRS");
- char *xdg_config_dirs = getenv("XDG_CONFIG_DIRS");
if (xdg_config_dirs != NULL) {
list_t *paths = split_string(xdg_config_dirs, ":");
name = "/i3/config";