diff --git a/ext/handle_archive/main.php b/ext/handle_archive/main.php index fd57e20c..a01589f8 100644 --- a/ext/handle_archive/main.php +++ b/ext/handle_archive/main.php @@ -74,7 +74,14 @@ class ArchiveFileHandler extends Extension { $list = ""; $dir = opendir("$base/$subdir"); - while($filename = readdir($dir)) { + + $files = array(); + while($f = readdir($dir)) { + $files[] = $f; + } + sort($files); + + foreach($files as $filename) { $fullpath = "$base/$subdir/$filename"; if(is_link($fullpath)) {