Load database with full path for installed stk

This commit is contained in:
Benau 2019-11-26 12:01:11 +08:00
parent f60583542e
commit 13da9bb9c7

View File

@ -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)