diff --git a/src/network/protocols/server_lobby.cpp b/src/network/protocols/server_lobby.cpp index 98d68c543..8d87d5d37 100644 --- a/src/network/protocols/server_lobby.cpp +++ b/src/network/protocols/server_lobby.cpp @@ -223,7 +223,9 @@ void ServerLobby::initDatabase() m_ip_geolocation_table_exists = false; if (!ServerConfig::m_sql_management) return; - int ret = sqlite3_open_v2(ServerConfig::m_database_file.c_str(), &m_db, + const std::string& path = ServerConfig::getConfigDirectory() + "/" + + ServerConfig::m_database_file.c_str(); + int ret = sqlite3_open_v2(path.c_str(), &m_db, SQLITE_OPEN_SHAREDCACHE | SQLITE_OPEN_FULLMUTEX | SQLITE_OPEN_READWRITE, NULL); if (ret != SQLITE_OK)