mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
[DatFile, FileTools] Revert some natural sorting stuff
This commit is contained in:
@@ -47,7 +47,13 @@ namespace SabreTools.Library.Dats
|
|||||||
if (merge || (diff != 0 && (diff & DiffMode.Against) == 0))
|
if (merge || (diff != 0 && (diff & DiffMode.Against) == 0))
|
||||||
{
|
{
|
||||||
// Make sure there are no folders in inputs
|
// Make sure there are no folders in inputs
|
||||||
List<string> newInputFileNames = FileTools.GetOnlyFilesFromInputs(inputPaths, appendparent: true, reverse: (diff & DiffMode.ReverseCascade) != 0);
|
List<string> newInputFileNames = FileTools.GetOnlyFilesFromInputs(inputPaths, appendparent: true);
|
||||||
|
|
||||||
|
// Reverse if we have to
|
||||||
|
if ((diff & DiffMode.ReverseCascade) != 0)
|
||||||
|
{
|
||||||
|
newInputFileNames.Reverse();
|
||||||
|
}
|
||||||
|
|
||||||
// Create a dictionary of all ROMs from the input DATs
|
// Create a dictionary of all ROMs from the input DATs
|
||||||
List<DatFile> datHeaders = PopulateUserData(newInputFileNames, inplace, clean,
|
List<DatFile> datHeaders = PopulateUserData(newInputFileNames, inplace, clean,
|
||||||
|
|||||||
@@ -408,9 +408,8 @@ namespace SabreTools.Library.Tools
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="inputs">List of strings representing directories and files</param>
|
/// <param name="inputs">List of strings representing directories and files</param>
|
||||||
/// <param name="appendparent">True if the parent name should be appended after the special character "¬", false otherwise (default)</param>
|
/// <param name="appendparent">True if the parent name should be appended after the special character "¬", false otherwise (default)</param>
|
||||||
/// <param name="reverse">True if the order output should be reversed, false otherwise (default)</param>
|
|
||||||
/// <returns>List of strings representing just files from the inputs</returns>
|
/// <returns>List of strings representing just files from the inputs</returns>
|
||||||
public static List<string> GetOnlyFilesFromInputs(List<string> inputs, bool appendparent = false, bool reverse = false)
|
public static List<string> GetOnlyFilesFromInputs(List<string> inputs, bool appendparent = false)
|
||||||
{
|
{
|
||||||
List<string> outputs = new List<string>();
|
List<string> outputs = new List<string>();
|
||||||
foreach (string input in inputs)
|
foreach (string input in inputs)
|
||||||
@@ -451,16 +450,6 @@ namespace SabreTools.Library.Tools
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Make sure the outputs are ordered correctly
|
|
||||||
if (reverse)
|
|
||||||
{
|
|
||||||
outputs.Sort(new NaturalReversedComparer());
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
outputs.Sort(new NaturalComparer());
|
|
||||||
}
|
|
||||||
|
|
||||||
return outputs;
|
return outputs;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user