mirror of
https://github.com/loot/libloot.git
synced 2026-07-27 14:16:01 -07:00
Fix first-time tips not displaying
If settings.yaml is deleted or the lastVersion key is missing.
This commit is contained in:
@@ -50,8 +50,7 @@ namespace loot {
|
||||
updateMasterlist(true),
|
||||
game("auto"),
|
||||
language(Language(Language::english)),
|
||||
lastGame("auto"),
|
||||
lastVersion(std::to_string(g_version_major) + "." + std::to_string(g_version_minor) + "." + std::to_string(g_version_patch)) {}
|
||||
lastGame("auto") {}
|
||||
|
||||
void LootSettings::load(YAML::Node& settings) {
|
||||
std::lock_guard<std::recursive_mutex> guard(mutex);
|
||||
|
||||
@@ -64,7 +64,7 @@ namespace loot {
|
||||
|
||||
const YAML::Node node = settings.toYaml();
|
||||
EXPECT_TRUE(node["updateMasterlist"].as<bool>());
|
||||
EXPECT_EQ(currentVersion, node["lastVersion"].as<std::string>());
|
||||
EXPECT_TRUE(node["lastVersion"].as<std::string>().empty());
|
||||
EXPECT_FALSE(node["filters"]);
|
||||
|
||||
// GameSettings equality only checks name and folder, so check
|
||||
|
||||
Reference in New Issue
Block a user