X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Ffmsapp.cpp;h=01fcf9a6cecd912982072e8d056274345b03461c;hb=278ee758050cb7772cd95946688c5b40104f4d8b;hp=ebebe4a8fa194e40c74bad2374363757efd97fd7;hpb=cd75427de26fc2ebc9baad558b1c0a081faa3b43;p=fms.git diff --git a/src/fmsapp.cpp b/src/fmsapp.cpp index ebebe4a..01fcf9a 100644 --- a/src/fmsapp.cpp +++ b/src/fmsapp.cpp @@ -162,7 +162,12 @@ int FMSApp::main(const std::vector &args) // so we need to set the working directory again int rval=chdir(m_workingdirectory.c_str()); - if(m_displayhelp) + if(VerifyDB()==false) + { + std::cout << "The FMS database failed verification. It is most likely corrupt!" << std::endl; + logger().fatal("The FMS database failed verification. It is most likely corrupt!"); + } + else if(m_displayhelp) { } else if(m_showoptions) @@ -177,6 +182,14 @@ int FMSApp::main(const std::vector &args) { logger().information("FMS startup v"FMS_VERSION); + std::string tempval=""; + Option::Instance()->Get("VacuumOnStartup",tempval); + if(tempval=="true") + { + logger().information("VACUUMing database"); + SQLite3DB::DB::Instance()->Execute("VACUUM;"); + } + StartThreads(); if(isInteractive()==true)