summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFurkan Sahin <furkan-dev@proton.me>2021-01-17 18:06:21 +0100
committerFurkan Sahin <furkan-dev@proton.me>2021-01-17 18:06:21 +0100
commite5996b8e9638cabe8e2ff987159361cf97bc4026 (patch)
tree3be86291423c4ba0bda03964a4074555e2321987
parent1fd04325a775682ab6ca458fc58297f09de878df (diff)
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.
-rw-r--r--sway/config.c4
1 files changed, 4 insertions, 0 deletions
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) {