fix: Settings being overwritten sometimes on crash

This commit is contained in:
WerWolv
2024-03-26 19:49:03 +01:00
parent f587710d1c
commit dd5ddbcc0f
2 changed files with 11 additions and 7 deletions

View File

@@ -226,13 +226,8 @@ namespace hex::init {
// Try to load settings from file
ContentRegistry::Settings::impl::load();
} catch (std::exception &e) {
// If that fails, create a new settings file
log::error("Failed to load configuration! {}", e.what());
ContentRegistry::Settings::impl::clear();
ContentRegistry::Settings::impl::store();
return false;
}