From f7b3ab381088bbd5e1b70221dad503cee90b6988 Mon Sep 17 00:00:00 2001 From: Tristan Riehs Date: Thu, 2 Jul 2026 10:26:29 +0200 Subject: Handle missing command-line-provided config file --- src/config.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/config.c b/src/config.c index b22588e..0352541 100644 --- a/src/config.c +++ b/src/config.c @@ -50,6 +50,10 @@ void ftag_config_init(const char *opt_config_file) char config_file[512]; if (opt_config_file) { + if (!file_exists(opt_config_file)) { + fprintf(stderr, "ftag: file %s does not exist\n", opt_config_file); + exit(EXIT_FAILURE); + } strbuild(config_file, "%s", opt_config_file); } else if (env_xdg_config_home) { -- cgit v1.2.3