[DatFile, NaturalComparer, Style] Fix current directory; fix sorting order

If we find stuff that's "identical" then we should really compare to see if it's ACTUALLY identical or not, or else this can make some things REALLY weird
This commit is contained in:
Matt Nadareski
2017-06-01 18:03:37 -07:00
parent 250dca39bf
commit 20b6208211
4 changed files with 9 additions and 13 deletions

View File

@@ -43,13 +43,13 @@ namespace NaturalSort
if (!table.TryGetValue(x, out x1))
{
//x1 = Regex.Split(x.Replace(" ", ""), "([0-9]+)");
x1 = Regex.Split(x, "([0-9]+)").Where(s => s != "").ToArray();
x1 = Regex.Split(x.ToLowerInvariant(), "([0-9]+)").Where(s => s != "").ToArray();
table.Add(x, x1);
}
if (!table.TryGetValue(y, out y1))
{
//y1 = Regex.Split(y.Replace(" ", ""), "([0-9]+)");
y1 = Regex.Split(y, "([0-9]+)").Where(s => s != "").ToArray();
y1 = Regex.Split(y.ToLowerInvariant(), "([0-9]+)").Where(s => s != "").ToArray();
table.Add(y, y1);
}