[DatFile] Proper subsets win

This commit is contained in:
Matt Nadareski
2017-03-31 23:37:14 -07:00
parent 735d5d89b7
commit 595ece5006

View File

@@ -801,11 +801,8 @@ namespace SabreTools.Helper.Dats
// Otherwise, if the parent doesn't already contain the non-disk, add it
else if (item.Type != ItemType.Disk && !this[parent].Contains(item))
{
// If we already have the same name in the parent set, rename the child
if (this[parent].Select(i => i.Name).Contains(item.Name))
{
item.Name = item.Machine.Name + "\\" + item.Name; // TODO: Go back to this for all roms in the future
}
// Rename the child so it's in a subfolder
item.Name = item.Machine.Name + "\\" + item.Name;
// Update the machine to be the new parent
item.Machine = parentMachine;