aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Drew DeVault <sir@cmpwn.com>2015-08-19 07:00:35 -0400
committerLibravatar Drew DeVault <sir@cmpwn.com>2015-08-19 07:00:35 -0400
commit5c8daa64875a1530e2ee4f5400e53953d927b396 (patch)
tree8f5c8b7e23ae22c5e3613d7e98880e3f56a9d090
parentfocus to only child (diff)
parentfixed string building for XDG_CONFIG_HOME config loading (diff)
downloadsway-5c8daa64875a1530e2ee4f5400e53953d927b396.tar.gz
sway-5c8daa64875a1530e2ee4f5400e53953d927b396.tar.zst
sway-5c8daa64875a1530e2ee4f5400e53953d927b396.zip
Merge pull request #81 from SyedAmerGilani/fix_xdg_config_home
fixed string building for XDG_CONFIG_HOME config loading
-rw-r--r--sway/config.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sway/config.c b/sway/config.c
index be9f70c1..13280f9d 100644
--- a/sway/config.c
+++ b/sway/config.c
@@ -41,7 +41,7 @@ static char *get_config_path() {
41 } else { 41 } else {
42 name = "/sway/config"; 42 name = "/sway/config";
43 temp = malloc(strlen(xdg_config_home) + strlen(name) + 1); 43 temp = malloc(strlen(xdg_config_home) + strlen(name) + 1);
44 strcpy(xdg_config_home, home); 44 strcpy(temp, xdg_config_home);
45 strcat(temp, name); 45 strcat(temp, name);
46 } 46 }
47 if (exists(temp)) { 47 if (exists(temp)) {
@@ -94,7 +94,7 @@ static char *get_config_path() {
94 } else { 94 } else {
95 name = "/i3/config"; 95 name = "/i3/config";
96 temp = malloc(strlen(xdg_config_home) + strlen(name) + 1); 96 temp = malloc(strlen(xdg_config_home) + strlen(name) + 1);
97 strcpy(xdg_config_home, home); 97 strcpy(temp, xdg_config_home);
98 strcat(temp, name); 98 strcat(temp, name);
99 } 99 }
100 if (exists(temp)) { 100 if (exists(temp)) {