mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2025-03-06 14:27:43 +00:00
Fixed some log messages when using a noload.txt file for a subdirectory
This commit is contained in:
parent
196e0d1031
commit
bb9b09ef89
|
@ -60,7 +60,7 @@ namespace GamelistFileParser
|
|||
treeNode = children.at(key);
|
||||
|
||||
if (treeNode->getNoLoad())
|
||||
return nullptr;
|
||||
return treeNode;
|
||||
|
||||
// This is the end.
|
||||
if (path_it == --pathList.end()) {
|
||||
|
@ -68,9 +68,11 @@ namespace GamelistFileParser
|
|||
return treeNode;
|
||||
|
||||
if (type == FOLDER) {
|
||||
LOG(LogWarning) << "A folder defined in gamelist.xml does not exist or "
|
||||
"contains no valid games: \""
|
||||
<< path << "\"";
|
||||
if (!Utils::FileSystem::exists(path + "/noload.txt")) {
|
||||
LOG(LogWarning) << "A folder defined in gamelist.xml does not exist or "
|
||||
"contains no valid games: \""
|
||||
<< path << "\"";
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
@ -243,6 +245,9 @@ namespace GamelistFileParser
|
|||
|
||||
FileData* file {findOrCreateFile(system, path, type)};
|
||||
|
||||
if (file != nullptr && file->getNoLoad())
|
||||
continue;
|
||||
|
||||
// Don't load entries with the wrong type. This should very rarely (if ever) happen.
|
||||
if (file != nullptr && ((tag == "game" && file->getType() == FOLDER) ||
|
||||
(tag == "folder" && file->getType() == GAME))) {
|
||||
|
@ -252,13 +257,15 @@ namespace GamelistFileParser
|
|||
}
|
||||
|
||||
if (!file) {
|
||||
if (!Utils::FileSystem::exists(path + "/noload.txt")) {
|
||||
#if defined(_WIN64)
|
||||
LOG(LogWarning)
|
||||
<< "Couldn't process \"" << Utils::String::replace(path, "/", "\\")
|
||||
<< "\", skipping entry";
|
||||
LOG(LogWarning)
|
||||
<< "Couldn't process \"" << Utils::String::replace(path, "/", "\\")
|
||||
<< "\", skipping entry";
|
||||
#else
|
||||
LOG(LogWarning) << "Couldn't process \"" << path << "\", skipping entry";
|
||||
LOG(LogWarning) << "Couldn't process \"" << path << "\", skipping entry";
|
||||
#endif
|
||||
}
|
||||
continue;
|
||||
}
|
||||
else if (!file->isArcadeAsset()) {
|
||||
|
|
|
@ -419,8 +419,13 @@ bool SystemData::populateFolder(FileData* folder)
|
|||
}
|
||||
|
||||
if (Utils::FileSystem::exists(filePath + "/noload.txt")) {
|
||||
#if defined(_WIN64)
|
||||
LOG(LogInfo) << "Skipped folder \"" << Utils::String::replace(filePath, "/", "\\")
|
||||
<< "\" as a noload.txt file is present";
|
||||
#else
|
||||
LOG(LogInfo) << "Skipped folder \"" << filePath
|
||||
<< "\" as a noload.txt file is present";
|
||||
#endif
|
||||
FileData* newFolder {new FileData(FOLDER, filePath, mEnvData, this)};
|
||||
newFolder->setNoLoad(true);
|
||||
folder->addChild(newFolder);
|
||||
|
|
Loading…
Reference in a new issue