Removed the es_log.txt entry when an es_systems.cfg legacy systems configuration file was found on startup

This commit is contained in:
Leon Styhre 2023-07-30 12:27:27 +02:00
parent 99a0766dd9
commit d0fc8cd56e
3 changed files with 5 additions and 23 deletions

View file

@ -1425,7 +1425,7 @@ void CollectionSystemsManager::addEnabledCollectionsToDisplayedSystems(
std::vector<std::string> CollectionSystemsManager::getSystemsFromConfig() std::vector<std::string> CollectionSystemsManager::getSystemsFromConfig()
{ {
std::vector<std::string> systems; std::vector<std::string> systems;
std::vector<std::string> configPaths {SystemData::getConfigPath(false)}; std::vector<std::string> configPaths {SystemData::getConfigPath()};
// Here we don't honor the <loadExclusive> tag which may be present in the custom es_systems.xml // Here we don't honor the <loadExclusive> tag which may be present in the custom es_systems.xml
// file under ~/.emulationstation/custom_systems as we really want to include all the themes // file under ~/.emulationstation/custom_systems as we really want to include all the themes

View file

@ -467,7 +467,7 @@ bool SystemData::loadConfig()
LOG(LogInfo) << "Only parsing the gamelist.xml files, not scanning system directories"; LOG(LogInfo) << "Only parsing the gamelist.xml files, not scanning system directories";
} }
const std::vector<std::string>& configPaths {getConfigPath(true)}; const std::vector<std::string>& configPaths {getConfigPath()};
const std::string& rompath {FileData::getROMDirectory()}; const std::string& rompath {FileData::getROMDirectory()};
bool onlyProcessCustomFile {false}; bool onlyProcessCustomFile {false};
@ -897,28 +897,10 @@ void SystemData::deleteSystems()
sSystemVector.clear(); sSystemVector.clear();
} }
std::vector<std::string> SystemData::getConfigPath(bool legacyWarning) std::vector<std::string> SystemData::getConfigPath()
{ {
std::vector<std::string> paths; std::vector<std::string> paths;
if (legacyWarning) {
const std::string& legacyConfigFile {Utils::FileSystem::getHomePath() +
"/.emulationstation/es_systems.cfg"};
if (Utils::FileSystem::exists(legacyConfigFile)) {
#if defined(_WIN64)
LOG(LogInfo) << "Found legacy systems configuration file \""
<< Utils::String::replace(legacyConfigFile, "/", "\\")
<< "\", to retain your customizations move it to "
"\"custom_systems\\es_systems.xml\" or otherwise delete the file";
#else
LOG(LogInfo) << "Found legacy systems configuration file \"" << legacyConfigFile
<< "\", to retain your customizations move it to "
"\"custom_systems/es_systems.xml\" or otherwise delete the file";
#endif
}
}
const std::string& customSystemsDirectory {Utils::FileSystem::getHomePath() + const std::string& customSystemsDirectory {Utils::FileSystem::getHomePath() +
"/.emulationstation/custom_systems"}; "/.emulationstation/custom_systems"};
@ -951,7 +933,7 @@ std::vector<std::string> SystemData::getConfigPath(bool legacyWarning)
bool SystemData::createSystemDirectories() bool SystemData::createSystemDirectories()
{ {
std::vector<std::string> configPaths {getConfigPath(true)}; std::vector<std::string> configPaths {getConfigPath()};
const std::string& rompath {FileData::getROMDirectory()}; const std::string& rompath {FileData::getROMDirectory()};
bool onlyProcessCustomFile {false}; bool onlyProcessCustomFile {false};

View file

@ -109,7 +109,7 @@ public:
static void deleteSystems(); static void deleteSystems();
// Loads the systems configuration file(s) at getConfigPath() and creates the systems. // Loads the systems configuration file(s) at getConfigPath() and creates the systems.
static bool loadConfig(); static bool loadConfig();
static std::vector<std::string> getConfigPath(bool legacyWarning); static std::vector<std::string> getConfigPath();
// Parses an optional es_systems_sorting.xml file. // Parses an optional es_systems_sorting.xml file.
static void loadSortingConfig(); static void loadSortingConfig();