mirror of
https://github.com/swaywm/sway.git
synced 2024-11-14 06:24:20 +01:00
fixed string building for XDG_CONFIG_HOME config loading
This commit is contained in:
parent
6dc1ae802b
commit
ba5b451dd0
@ -41,7 +41,7 @@ static char *get_config_path() {
|
|||||||
} else {
|
} else {
|
||||||
name = "/sway/config";
|
name = "/sway/config";
|
||||||
temp = malloc(strlen(xdg_config_home) + strlen(name) + 1);
|
temp = malloc(strlen(xdg_config_home) + strlen(name) + 1);
|
||||||
strcpy(xdg_config_home, home);
|
strcpy(temp, xdg_config_home);
|
||||||
strcat(temp, name);
|
strcat(temp, name);
|
||||||
}
|
}
|
||||||
if (exists(temp)) {
|
if (exists(temp)) {
|
||||||
@ -94,7 +94,7 @@ static char *get_config_path() {
|
|||||||
} else {
|
} else {
|
||||||
name = "/i3/config";
|
name = "/i3/config";
|
||||||
temp = malloc(strlen(xdg_config_home) + strlen(name) + 1);
|
temp = malloc(strlen(xdg_config_home) + strlen(name) + 1);
|
||||||
strcpy(xdg_config_home, home);
|
strcpy(temp, xdg_config_home);
|
||||||
strcat(temp, name);
|
strcat(temp, name);
|
||||||
}
|
}
|
||||||
if (exists(temp)) {
|
if (exists(temp)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user