aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files/ajax/rawlist.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files/ajax/rawlist.php')
-rw-r--r--apps/files/ajax/rawlist.php5
1 files changed, 2 insertions, 3 deletions
diff --git a/apps/files/ajax/rawlist.php b/apps/files/ajax/rawlist.php
index 89c21a172fc..6433ddefd69 100644
--- a/apps/files/ajax/rawlist.php
+++ b/apps/files/ajax/rawlist.php
@@ -33,6 +33,8 @@ if (is_array($mimetypes) && count($mimetypes)) {
} else {
$files = array_merge($files, \OC\Files\Filesystem::getDirectoryContent($dir));
}
+// Sort by name
+usort($files, array('\OCA\Files\Helper', 'fileCmp'));
$result = array();
foreach ($files as $file) {
@@ -51,7 +53,4 @@ foreach ($files as $file) {
$result[] = $fileData;
}
-// Sort by name
-usort($result, array('\OCA\Files\Helper', 'fileCmp'));
-
OC_JSON::success(array('data' => $result));