diff --git a/BigBaseV2/src/core/globals.hpp b/BigBaseV2/src/core/globals.hpp index 12c6db8e..b41064ee 100644 --- a/BigBaseV2/src/core/globals.hpp +++ b/BigBaseV2/src/core/globals.hpp @@ -309,9 +309,13 @@ struct globals { try { file >> this->options; + + file.close(); } catch (const std::exception&) { + file.close(); + LOG(WARNING) << "Detected corrupt settings, writing default config..."; this->write_default_config();