mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-22 06:05:38 +00:00
Fixed a very rare bug where games and folders could get mixed up during gamelist.xml parsing.
This commit is contained in:
parent
990eb84707
commit
c66d2ace27
|
@ -190,6 +190,15 @@ namespace GamelistFileParser
|
|||
}
|
||||
|
||||
FileData* file = findOrCreateFile(system, path, type);
|
||||
|
||||
// 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))) {
|
||||
LOG(LogWarning)
|
||||
<< "Game/folder mismatch for \"" << path << "\", skipping entry";
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!file) {
|
||||
LOG(LogError) << "Couldn't find or create \"" << path << "\", skipping entry";
|
||||
continue;
|
||||
|
|
Loading…
Reference in a new issue