[DatItem] Comparing HTML converted versions leads to issues

This commit is contained in:
Matt Nadareski
2016-10-05 09:54:18 -07:00
parent 65fc747353
commit 38ff7ac1d8

View File

@@ -809,11 +809,11 @@ namespace SabreTools.Helper
{ {
if ((x.Type == ItemType.Rom || x.Type == ItemType.Disk) && (y.Type == ItemType.Rom || y.Type == ItemType.Disk)) if ((x.Type == ItemType.Rom || x.Type == ItemType.Disk) && (y.Type == ItemType.Rom || y.Type == ItemType.Disk))
{ {
if (Path.GetDirectoryName(HttpUtility.HtmlEncode(x.Name)) == Path.GetDirectoryName(HttpUtility.HtmlEncode(y.Name))) if (Path.GetDirectoryName(x.Name) == Path.GetDirectoryName(y.Name))
{ {
return nc.Compare(Path.GetFileName(HttpUtility.HtmlEncode(x.Name)), Path.GetFileName(HttpUtility.HtmlEncode(y.Name))); return nc.Compare(Path.GetFileName(x.Name), Path.GetFileName(y.Name));
} }
return nc.Compare(Path.GetDirectoryName(HttpUtility.HtmlEncode(x.Name)), Path.GetDirectoryName(HttpUtility.HtmlEncode(y.Name))); return nc.Compare(Path.GetDirectoryName(x.Name), Path.GetDirectoryName(y.Name));
} }
else if ((x.Type == ItemType.Rom || x.Type == ItemType.Disk) && (y.Type != ItemType.Rom && y.Type != ItemType.Disk)) else if ((x.Type == ItemType.Rom || x.Type == ItemType.Disk) && (y.Type != ItemType.Rom && y.Type != ItemType.Disk))
{ {