diff options
Diffstat (limited to 'apps/files')
-rw-r--r-- | apps/files/js/filelist.js | 2 | ||||
-rw-r--r-- | apps/files/lib/helper.php | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js index 532ed466968..383b6c0cd2e 100644 --- a/apps/files/js/filelist.js +++ b/apps/files/js/filelist.js @@ -1860,7 +1860,7 @@ if (fileInfo1.type !== 'dir' && fileInfo2.type === 'dir') { return 1; } - return fileInfo1.name.localeCompare(fileInfo2.name); + return OC.Util.naturalSortCompare(fileInfo1.name, fileInfo2.name); }, /** * Compares two file infos by size. diff --git a/apps/files/lib/helper.php b/apps/files/lib/helper.php index 50b4e8338a8..d857c1df154 100644 --- a/apps/files/lib/helper.php +++ b/apps/files/lib/helper.php @@ -66,7 +66,7 @@ class Helper } elseif ($aType !== 'dir' and $bType === 'dir') { return 1; } else { - return strnatcasecmp($a->getName(), $b->getName()); + return \OCP\Util::naturalSortCompare($a->getName(), $b->getName()); } } |