From 0219eb2bfaeca6b267cb7c83ac638f04c649af3e Mon Sep 17 00:00:00 2001 From: moodler Date: Sat, 12 Mar 2005 06:23:22 +0000 Subject: [PATCH] More readdir problems! --- files/index.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/files/index.php b/files/index.php index f81923f38d7..96bcc273ae9 100644 --- a/files/index.php +++ b/files/index.php @@ -567,7 +567,7 @@ function fulldelete($location) { if (is_dir($location)) { $currdir = opendir($location); - while ($file = readdir($currdir)) { + while (false !== ($file = readdir($currdir))) { if ($file <> ".." && $file <> ".") { $fullfile = $location."/".$file; if (is_dir($fullfile)) { @@ -631,7 +631,7 @@ function printfilelist($filelist) { echo "pixpath/f/folder.gif\" height=\"16\" width=\"16\" alt=\"\" /> $file
"; $subfilelist = array(); $currdir = opendir($basedir.$file); - while ($subfile = readdir($currdir)) { + while (false !== ($subfile = readdir($currdir))) { if ($subfile <> ".." && $subfile <> ".") { $subfilelist[] = $file."/".$subfile; }