From c8ca3ef80b64a570b9a1e0f9334f4ffb6723df74 Mon Sep 17 00:00:00 2001 From: Fabrice Mouhartem Date: Mon, 20 Jul 2026 15:03:05 +0200 Subject: [PATCH] fix(drive): sorting consistent with display - Filenames are trimmed on display, which causes inconsistencies in sorts when there are trailing spaces in some filenames. --- www/common/drive-ui.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/www/common/drive-ui.js b/www/common/drive-ui.js index 463e0a9c6..9a98b14a2 100644 --- a/www/common/drive-ui.js +++ b/www/common/drive-ui.js @@ -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);