From 9490e4aae2db793437cd4ba887543a00bff60e9b Mon Sep 17 00:00:00 2001 From: Daku Date: Wed, 12 Aug 2015 06:43:38 +0100 Subject: [PATCH] fix endless loop when checking for subdirectory is there any reason why this was only checking for "." & ".." ? --- core/util.inc.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/util.inc.php b/core/util.inc.php index ec291222..f30b6ff8 100644 --- a/core/util.inc.php +++ b/core/util.inc.php @@ -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")