[DATFromDir] Force file order parity

This commit is contained in:
Matt Nadareski
2016-09-14 11:05:40 -07:00
parent c44b9ee5b7
commit b5307b79c3
4 changed files with 18 additions and 8 deletions

View File

@@ -1779,9 +1779,12 @@ namespace SabreTools.Helper
}
// Now go through and sort all of the lists
foreach (string key in sortable.Keys)
List<string> keys = sortable.Keys.ToList();
foreach (string key in keys)
{
RomTools.Sort(sortable[key], norename);
List<Rom> sortedlist = sortable[key];
RomTools.Sort(ref sortedlist, norename);
sortable[key] = sortedlist;
}
// Output the count if told to
@@ -1856,9 +1859,12 @@ namespace SabreTools.Helper
}
// Now go through and sort all of the lists
foreach (string key in sortable.Keys)
List<string> keys = sortable.Keys.ToList();
foreach (string key in keys)
{
RomTools.Sort(sortable[key], norename);
List<Rom> sortedlist = sortable[key];
RomTools.Sort(ref sortedlist, norename);
sortable[key] = sortedlist;
}
// Output the count if told to

View File

@@ -224,7 +224,7 @@ namespace SabreTools.Helper
/// <param name="roms">List of RomData objects representing the roms to be sorted</param>
/// <param name="norename">True if files are not renamed, false otherwise</param>
/// <returns>True if it sorted correctly, false otherwise</returns>
public static bool Sort(List<Rom> roms, bool norename)
public static bool Sort(ref List<Rom> roms, bool norename)
{
try
{