From 8230ca77ec237b7828e48e3f16ec1ef8747a259b Mon Sep 17 00:00:00 2001 From: Bob Polis Date: Wed, 1 Dec 2021 09:54:54 +0100 Subject: [PATCH] Config file does not need to exist --- src/config_file.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/config_file.cpp b/src/config_file.cpp index d9261fb..7230725 100644 --- a/src/config_file.cpp +++ b/src/config_file.cpp @@ -14,7 +14,9 @@ sc::config_file::config_file(const std::string& prog_name, bool has_dir) } else { cfg_path = _root + prog_name + "rc"; // standard "run control" file } - _cfg = sc::parse_ini_file(cfg_path); + if (sc::file_exists(cfg_path)) { + _cfg = sc::parse_ini_file(cfg_path); + } } std::string sc::config_file::path_for_file_name(const std::string& file_name) {