[DatItem] Remove the directory/file split

This commit is contained in:
Matt Nadareski
2016-09-26 12:27:01 -07:00
parent ad34192a14
commit 341e946083

View File

@@ -756,11 +756,7 @@ 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(x.Name) == Path.GetDirectoryName(y.Name)) return nc.Compare(x.Name, y.Name);
{
return nc.Compare(Path.GetFileName(x.Name), Path.GetFileName(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))
{ {
@@ -772,11 +768,7 @@ namespace SabreTools.Helper
} }
else else
{ {
if (Path.GetDirectoryName(x.Name) == Path.GetDirectoryName(y.Name)) return nc.Compare(x.Name, y.Name);
{
return nc.Compare(Path.GetFileName(x.Name), Path.GetFileName(y.Name));
}
return nc.Compare(Path.GetDirectoryName(x.Name), Path.GetDirectoryName(y.Name));
} }
} }
return nc.Compare(x.MachineName, y.MachineName); return nc.Compare(x.MachineName, y.MachineName);