From 38571e6a0c134ea8ea5d8dc2e7c50ef37085ae83 Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Sun, 17 Jan 2021 18:06:21 +0100 Subject: Log when config file is not found This happens when Sway is not installed on the system, so there's no default config in /etc. --- sway/config.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sway/config.c b/sway/config.c index 077a5b4a..6e665434 100644 --- a/sway/config.c +++ b/sway/config.c @@ -407,6 +407,10 @@ bool load_main_config(const char *file, bool is_active, bool validating) { } else { path = get_config_path(); } + if (path == NULL) { + sway_log(SWAY_ERROR, "Cannot find config file"); + return false; + } char *real_path = realpath(path, NULL); if (real_path == NULL) { -- cgit v1.2.3-54-g00ecf