diff --git a/src/database-sqlite3.cpp b/src/database-sqlite3.cpp index 268687c20..7f7850719 100644 --- a/src/database-sqlite3.cpp +++ b/src/database-sqlite3.cpp @@ -86,58 +86,54 @@ void Database_SQLite3::verifyDatabase() { if(m_database) return; - { - std::string dbp = m_savedir + DIR_DELIM + "map.sqlite"; - bool needs_create = false; - int d; + std::string dbp = m_savedir + DIR_DELIM "map.sqlite"; + bool needs_create = false; + int d; - /* - Open the database connection - */ + // Open the database connection - createDirs(m_savedir); // ? + createDirs(m_savedir); // ? - if(!fs::PathExists(dbp)) - needs_create = true; + if(!fs::PathExists(dbp)) + needs_create = true; - d = sqlite3_open_v2(dbp.c_str(), &m_database, SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE, NULL); - if(d != SQLITE_OK) { - infostream<<"WARNING: SQLite3 database failed to open: "<