1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-08 09:37:53 +00:00

Add a warning if replace==config is used.

This commit is contained in:
Petr Mikheev 2022-02-03 00:07:30 +01:00
parent 5b23ba3faf
commit 6084dbfc3a

View File

@ -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<std::vector<std::string>>())
{
if (var == "config")
{
Log(Debug::Warning) << "replace=config is not allowed and was ignored";
break;
}
}
}
if (!quiet)
{
Log(Debug::Info) << "Logs dir: " << getUserConfigPath().string();