fix(drive): sorting consistent with display

- Filenames are trimmed on display, which causes inconsistencies in
  sorts when there are trailing spaces in some filenames.
This commit is contained in:
Fabrice Mouhartem 2026-07-20 15:03:05 +02:00
parent cc675f400d
commit c8ca3ef80b
No known key found for this signature in database

View File

@ -3649,10 +3649,10 @@ define([
var naturalSort = function(a, b) {
if (typeof(a) === "string") {
a = splitStringToTextAndNumbers(a);
a = splitStringToTextAndNumbers(a.trim());
}
if (typeof(b) === "string") {
b = splitStringToTextAndNumbers(b);
b = splitStringToTextAndNumbers(b.trim());
}
var comp = lexicographicCompare(a, b);