From: moodler Date: Sun, 17 Aug 2003 14:14:12 +0000 (+0000) Subject: There's no point in printing the notice - if there's no directory X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=487c1711fe2687386fbbb285ca95bcb63be62dbf;p=moodle.git There's no point in printing the notice - if there's no directory there's no files ... pretty simple. --- 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; }