diff options
author | Gareth Nelson <gareth@garethnelson.com> | 2017-02-22 14:10:32 +0100 |
---|---|---|
committer | Mattes D <github@xoft.cz> | 2017-02-22 14:10:32 +0100 |
commit | 1c31cb7eecc92d2fb218da8948e3201b618a46d2 (patch) | |
tree | 48212c2758941cd4bc1115fa8bdd91356c341d65 /src/Root.cpp | |
parent | Add 1.11.1/1.11.2 protocol (#3575) (diff) | |
download | cuberite-1c31cb7eecc92d2fb218da8948e3201b618a46d2.tar cuberite-1c31cb7eecc92d2fb218da8948e3201b618a46d2.tar.gz cuberite-1c31cb7eecc92d2fb218da8948e3201b618a46d2.tar.bz2 cuberite-1c31cb7eecc92d2fb218da8948e3201b618a46d2.tar.lz cuberite-1c31cb7eecc92d2fb218da8948e3201b618a46d2.tar.xz cuberite-1c31cb7eecc92d2fb218da8948e3201b618a46d2.tar.zst cuberite-1c31cb7eecc92d2fb218da8948e3201b618a46d2.zip |
Diffstat (limited to '')
-rw-r--r-- | src/Root.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/Root.cpp b/src/Root.cpp index 37fbf125f..508d0a648 100644 --- a/src/Root.cpp +++ b/src/Root.cpp @@ -141,8 +141,14 @@ void cRoot::Start(std::unique_ptr<cSettingsRepositoryInterface> a_OverridesRepo) LOG("Reading server config..."); + m_SettingsFilename = "settings.ini"; + if (a_OverridesRepo->HasValue("Server","ConfigFile")) + { + m_SettingsFilename = a_OverridesRepo->GetValue("Server","ConfigFile"); + } + auto IniFile = cpp14::make_unique<cIniFile>(); - bool IsNewIniFile = !IniFile->ReadFile("settings.ini"); + bool IsNewIniFile = !IniFile->ReadFile(m_SettingsFilename); if (IsNewIniFile) { |