diff --git a/bureau/admin/bro_main.php b/bureau/admin/bro_main.php index 3474c7d8..0f356cb1 100644 --- a/bureau/admin/bro_main.php +++ b/bureau/admin/bro_main.php @@ -150,10 +150,6 @@ if (isset($actextract) && $actextract) { } } -/* Creation de la liste des fichiers courants */ -$c=$bro->filelist($R, $showdirsize ); -if ($c===false) $error=$err->errstr(); - ?>
diff --git a/bureau/class/m_bro.php b/bureau/class/m_bro.php index 1f3ce951..58aba874 100644 --- a/bureau/class/m_bro.php +++ b/bureau/class/m_bro.php @@ -160,9 +160,13 @@ class m_bro { * @return array le tableau contenant les fichiers de $dir, et */ function filelist($dir="", $showdirsize = false) { - global $db,$cuid; + global $db,$cuid,$err; $db->query("UPDATE browser SET lastdir='$dir' WHERE uid='$cuid';"); $absolute=$this->convertabsolute($dir,0); + if (! file_exists($absolute)) { + $err->raise('bro',_("This directory do not exist")); + return false; + } if ($dir = @opendir($absolute)) { while (($file = readdir($dir)) !== false) { if ($file!="." && $file!="..") { |