[RomTools] Make sort treat SuperDAT paths properly

This commit is contained in:
Matt Nadareski
2016-09-07 17:26:59 -07:00
parent 375d84ebf8
commit 7fe506e908

View File

@@ -1,5 +1,6 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.IO;
using System.Linq; using System.Linq;
namespace SabreTools.Helper namespace SabreTools.Helper
@@ -233,7 +234,10 @@ namespace SabreTools.Helper
{ {
if (x.Machine.Name == y.Machine.Name) if (x.Machine.Name == y.Machine.Name)
{ {
return Style.CompareNumeric(x.Name, y.Name); if (Path.GetDirectoryName(x.Name) == Path.GetDirectoryName(y.Name))
{
return Style.CompareNumeric(Path.GetFileName(x.Name), Path.GetFileName(y.Name));
}
} }
return Style.CompareNumeric(x.Machine.Name, y.Machine.Name); return Style.CompareNumeric(x.Machine.Name, y.Machine.Name);
} }