From 6084dbfc3a64feaee7305b2f710c5855f8f34678 Mon Sep 17 00:00:00 2001 From: Petr Mikheev Date: Thu, 3 Feb 2022 00:07:30 +0100 Subject: [PATCH] Add a warning if replace==config is used. --- components/files/configurationmanager.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/components/files/configurationmanager.cpp b/components/files/configurationmanager.cpp index 4ffd9013b7..87f4cd4943 100644 --- a/components/files/configurationmanager.cpp +++ b/components/files/configurationmanager.cpp @@ -123,6 +123,18 @@ void ConfigurationManager::readConfiguration(boost::program_options::variables_m if (!boost::filesystem::is_directory(mScreenshotPath)) mScreenshotPath = mUserDataPath; + if (!quiet && !variables["replace"].empty()) + { + for (const std::string& var : variables["replace"].as>()) + { + if (var == "config") + { + Log(Debug::Warning) << "replace=config is not allowed and was ignored"; + break; + } + } + } + if (!quiet) { Log(Debug::Info) << "Logs dir: " << getUserConfigPath().string();