From b1bb9743f2c6b2111c47fd4fbe0b976bd356621a Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Sat, 26 Dec 2020 20:20:45 +0100 Subject: [PATCH] Made the 'fullname' tag in es_systems.cfg mandatory. --- es-app/src/SystemData.cpp | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/es-app/src/SystemData.cpp b/es-app/src/SystemData.cpp index d2bc5b6a1..6854ad673 100644 --- a/es-app/src/SystemData.cpp +++ b/es-app/src/SystemData.cpp @@ -285,7 +285,8 @@ bool SystemData::loadConfig() cmd = system.child("command").text().get(); // Platform ID list - const std::string platformList = system.child("platform").text().get(); + const std::string platformList = + Utils::String::toLower(system.child("platform").text().get()); std::vector platformStrs = readList(platformList); std::vector platformIds; for (auto it = platformStrs.cbegin(); it != platformStrs.cend(); it++) { @@ -312,9 +313,15 @@ bool SystemData::loadConfig() themeFolder = system.child("theme").text().as_string(name.c_str()); // Validate. - if (name.empty() || path.empty() || extensions.empty() || cmd.empty()) { - LOG(LogError) << "System \"" << name << - "\" is missing name, path, extension, or command"; + + if (name.empty()) { + LOG(LogError) << + "A system in the es_systems.cfg file has no name defined, skipping entry."; + continue; + } + else if (fullname.empty() || path.empty() || extensions.empty() || cmd.empty()) { + LOG(LogError) << "System \"" << name << "\" is missing the fullname, path, " + "extension, or command tag, skipping entry."; continue; }