fix endless loop when checking for subdirectory

is there any reason why this was only checking for "." & ".." ?
This commit is contained in:
Daku 2015-08-12 06:43:38 +01:00
parent b2d8b41388
commit 9490e4aae2

View File

@ -1276,7 +1276,8 @@ function list_files(/*string*/ $base, $_sub_dir="") {
// ignore
}
else if(is_dir($full_path)) {
if($filename == "." || $filename == "..") {
if(!($filename == "." || $filename == "..")) {
//subdirectory found
$file_list = array_merge(
$file_list,
list_files($base, "$_sub_dir/$filename")