Fix #25910: Folders starting with numbers sort incorrectly (#25914)

Commit 43f7d2d91 introduced a regression where logicalCmp compared digit starting strings lexicographically instead of numerically, causing folders to sort as "1, 10, 11, 2..." instead of "1, 2... 10, 11". This commit removes the broken special case,  the main loop already handles
numeric comparison correctly
This commit is contained in:
frozensnowy authored and GitHub committed 2026-02-05 21:50:21 +01:00
1 parent 1723925c5c
commit b3217703fe
3 files changed
+10 -33

No files matched your search

+5 -3
View File
@@ -255,10 +255,12 @@ TEST_F(CodepointViewTest, CodepointView_iterate)
TEST_F(StringTest, LogicalCompare)
{
// Strings starting with digits come first, sorted numerically
// Then alphabetic strings sorted case-insensitively
std::vector<std::string> expected = {
"1001 Troubles", "3D Cinema 1", "Aerial Cycles", "Batflyer", "bpb",
"bpb.sv6", "Drive-by", "foo", "foobar", "Guest 10",
"Guest 99", "Guest 100", "John v2.0", "John v2.1", "River of the Damned",
"3D Cinema 1", "1001 Troubles", "Aerial Cycles", "Batflyer", "bpb",
"bpb.sv6", "Drive-by", "foo", "foobar", "Guest 10",
"Guest 99", "Guest 100", "John v2.0", "John v2.1", "River of the Damned",
"Terror-dactyl",
};