From e977246d7c6efdf663914c633260224ffe42b9ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrik=20Novotn=C3=BD?= Date: Wed, 11 Apr 2018 15:32:22 +0200 Subject: [PATCH] Sort files in dialog by name. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Patrik Novotný --- core/js/oc-dialogs.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/js/oc-dialogs.js b/core/js/oc-dialogs.js index fae6536e48..97b9d91023 100644 --- a/core/js/oc-dialogs.js +++ b/core/js/oc-dialogs.js @@ -847,7 +847,7 @@ var OCdialogs = { } else if(a.type !== 'dir' && b.type === 'dir') { return 1; } else { - return -(a.mtime - b.mtime); + return a.name.localeCompare(b.name, undefined, {numeric: true}); } });