aboutsummaryrefslogtreecommitdiffstats
path: root/sway/commands/reload.c
diff options
context:
space:
mode:
Diffstat (limited to 'sway/commands/reload.c')
-rw-r--r--sway/commands/reload.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/sway/commands/reload.c b/sway/commands/reload.c
index 19ec065c..3c994d54 100644
--- a/sway/commands/reload.c
+++ b/sway/commands/reload.c
@@ -22,7 +22,12 @@ static void do_reload(void *data) {
22 list_add(bar_ids, strdup(bar->id)); 22 list_add(bar_ids, strdup(bar->id));
23 } 23 }
24 24
25 if (!load_main_config(config->current_config_path, true, false)) { 25 const char *path = NULL;
26 if (config->user_config_path) {
27 path = config->current_config_path;
28 }
29
30 if (!load_main_config(path, true, false)) {
26 sway_log(SWAY_ERROR, "Error(s) reloading config"); 31 sway_log(SWAY_ERROR, "Error(s) reloading config");
27 list_free_items_and_destroy(bar_ids); 32 list_free_items_and_destroy(bar_ids);
28 return; 33 return;
@@ -55,7 +60,12 @@ struct cmd_results *cmd_reload(int argc, char **argv) {
55 return error; 60 return error;
56 } 61 }
57 62
58 if (!load_main_config(config->current_config_path, true, true)) { 63 const char *path = NULL;
64 if (config->user_config_path) {
65 path = config->current_config_path;
66 }
67
68 if (!load_main_config(path, true, true)) {
59 return cmd_results_new(CMD_FAILURE, "Error(s) reloading config."); 69 return cmd_results_new(CMD_FAILURE, "Error(s) reloading config.");
60 } 70 }
61 71