aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuminarys <kizunanohikari@gmail.com>2015-08-10 14:24:31 -0500
committerLuminarys <kizunanohikari@gmail.com>2015-08-10 14:24:31 -0500
commit88997bbfe65c20ff2bbc28f49ee2d84a79972d61 (patch)
tree03362796768e30703d463febd494d7956b271cc3
parent508980e3ab930fd1ea16cbb769771126110aa329 (diff)
Minor fix
-rw-r--r--sway/commands.c20
1 files changed, 2 insertions, 18 deletions
diff --git a/sway/commands.c b/sway/commands.c
index 98786885..4db254b6 100644
--- a/sway/commands.c
+++ b/sway/commands.c
@@ -179,24 +179,8 @@ int cmd_reload(struct sway_config *config, int argc, char **argv) {
sway_log(L_ERROR, "Invalid reload command (expected 0 arguments, got %d)", argc);
return 1;
}
-
- // TODO: Allow use of more config file locations
- const char *name = "/.sway/config";
- const char *home = getenv("HOME");
- char *temp = malloc(strlen(home) + strlen(name) + 1);
- strcpy(temp, home);
- strcat(temp, name);
- FILE *f = fopen(temp, "r");
- if (!f) {
- sway_log(L_ERROR, "Sway config file not found, aborting reload!");
- free(temp);
- return 1;
- }
- free(temp);
- config = read_config(f, true);
- fclose(f);
- if (load_config()) {
-
+ if (!load_config()) {
+ return 1;
}
return 0;