[BUGFIX] LocalDriver: Recursive file listing is broken
[Packages/TYPO3.CMS.git] / typo3 / sysext / core / Classes / Resource / ResourceStorage.php
index f96987c..4b7d636 100644 (file)
@@ -879,7 +879,12 @@ class ResourceStorage {
                }
                $filters = $useFilters == TRUE ? $this->fileAndFolderNameFilters : array();
                $items = $this->driver->getFileList($path, $start, $numberOfItems, $filters, $rows, $recursive);
-               uksort($items, 'strnatcasecmp');
+
+               // We should not sort when fetching a recursive list, as these are indexed numerically
+               if ($recursive === FALSE) {
+                       uksort($items, 'strnatcasecmp');
+               }
+
                return $items;
        }