Skip to content
Permalink
Browse files

Fall back to sqlite3 if no backend set in world.mt

fixes #76
  • Loading branch information
sfan5 committed Apr 23, 2020
1 parent 2ae790c commit 92f6b051a5a93bba086c3ef31222aa1f5f531147
Showing with 4 additions and 4 deletions.
  1. +4 −4 TileGenerator.cpp
@@ -330,11 +330,11 @@ std::set<std::string> TileGenerator::getSupportedBackends()
void TileGenerator::openDb(const std::string &input)
{
std::string backend = m_backend;
if(backend == "") {
std::ifstream ifs((input + "/world.mt").c_str());
if (backend == "") {
std::ifstream ifs(input + "/world.mt");
if(!ifs.good())
throw std::runtime_error("Failed to read world.mt");
backend = read_setting("backend", ifs);
throw std::runtime_error("Failed to open world.mt");
backend = read_setting_default("backend", ifs, "sqlite3");
ifs.close();
}

0 comments on commit 92f6b05

Please sign in to comment.
You can’t perform that action at this time.