[DatFile] Remove extra merging logic, external program found to have issue

This commit is contained in:
Matt Nadareski
2017-02-04 15:35:27 -08:00
parent 53033f99b0
commit 039a6368a8

View File

@@ -809,23 +809,8 @@ namespace SabreTools.Helper.Dats
List<DatItem> items = this[game]; List<DatItem> items = this[game];
foreach (DatItem item in items) foreach (DatItem item in items)
{ {
// We want a log statement for a unique case so that bug reports can be filed // If the parent doesn't already contain the item, add it
if (item.Type == ItemType.Disk if (!this[parent].Contains(item))
&& !this[parent].Select(i => i.Name).Contains(item.Name)
&& this[parent].Contains(item))
{
logger.Warning("For disk '" + item.Name + "', a hash-duplicate was found with a different name in set '" + parent + "'");
}
// If we have a disk, we have to see ONLY if the name is in the list
if (item.Type == ItemType.Disk && !this[parent].Select(i => i.Name).Contains(item.Name))
{
item.Machine = parentMachine;
this[parent].Add(item);
}
// Otherwise, we want to add it normally
else if (!this[parent].Contains(item))
{ {
// TODO: Remove hack for just disks at a later date // TODO: Remove hack for just disks at a later date
item.Name = (item.Type != ItemType.Disk ? item.Machine.Name + "\\" : "") + item.Name; item.Name = (item.Type != ItemType.Disk ? item.Machine.Name + "\\" : "") + item.Name;