diff --git a/lib/moodlelib.php b/lib/moodlelib.php index 7d5e7e4831e..59bbc4549d3 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; }