diff --git a/index.php b/index.php index 7e3c826..e67ffac 100644 --- a/index.php +++ b/index.php @@ -76,7 +76,8 @@ if (isset($_GET['f'])) { // Sort and Reverse Filelist natcasesort($files); $files = array_reverse($files); -$files = array_merge($dirs, $files); +if (!empty($dirs)) + $files = array_merge($dirs, $files); // Get Files for current Page $curfiles = array_slice($files, ($page-1)*$slice ,$slice, true);