diff --git a/arbre.php b/arbre.php index 6414ef1..92346bc 100644 --- a/arbre.php +++ b/arbre.php @@ -41,7 +41,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') { break; case 'delete_folder': - if ($path && isSecurePath($path)) { + if ($path && isSecurePath($path) && $path !== './liste_albums') { // Empêcher la suppression du dossier racine function rrmdir($dir) { if (is_dir($dir)) { $objects = scandir($dir); @@ -76,167 +76,185 @@ if (!isSecurePath($currentPath)) { } function generateTree($path, $currentPath) { - if (!is_dir($path)) return ''; - - $output = '