diff --git a/core/src/plugins/access.fs/class.fsAccessDriver.php b/core/src/plugins/access.fs/class.fsAccessDriver.php index 3574cd3916..d19fef3b2e 100644 --- a/core/src/plugins/access.fs/class.fsAccessDriver.php +++ b/core/src/plugins/access.fs/class.fsAccessDriver.php @@ -1011,10 +1011,10 @@ public function switchAction($action, $httpVars, $fileVars) closedir($handle); $fullList = array("d" => array(), "z" => array(), "f" => array()); + $nodes = scandir($path); + usort($nodes, "strcasecmp"); if (isSet($orderField) && isSet($orderDirection) && $orderField == "ajxp_label" && $orderDirection == "desc") { - $nodes = scandir($path, 1); - } else { - $nodes = scandir($path); + $nodes = array_reverse($nodes); } if (!empty($this->driverConf["SCANDIR_RESULT_SORTFONC"])) { usort($nodes, $this->driverConf["SCANDIR_RESULT_SORTFONC"]);