From 487c1711fe2687386fbbb285ca95bcb63be62dbf Mon Sep 17 00:00:00 2001 From: moodler Date: Sun, 17 Aug 2003 14:14:12 +0000 Subject: [PATCH] There's no point in printing the notice - if there's no directory there's no files ... pretty simple. --- lib/moodlelib.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lib/moodlelib.php b/lib/moodlelib.php index 7d5e7e4831..59bbc4549d 100644 --- a/lib/moodlelib.php +++ b/lib/moodlelib.php @@ -1063,11 +1063,8 @@ function get_directory_list($rootdir, $excludefile="", $descend=true) { /// If excludefile is defined, then that file/directory is ignored $dirs = array(); - - $dir = opendir($rootdir); - if (!$dir) { - notify("Error: unable to read this directory! : $rootdir"); + if (!$dir = opendir($rootdir)) { return $dirs; } -- 2.39.5