From a30b199b305b0ec1a85c3bd842dfa4aac1917b93 Mon Sep 17 00:00:00 2001 From: Roman Kelesidis Date: Mon, 9 Jun 2025 14:03:51 +0300 Subject: [PATCH] Updated --- install.php | 2 +- library/includes/functions_cli.php | 21 --------------------- 2 files changed, 1 insertion(+), 22 deletions(-) diff --git a/install.php b/install.php index ba0a6ae25..efd2a5969 100644 --- a/install.php +++ b/install.php @@ -94,7 +94,7 @@ if (is_file(BB_ROOT . '.env')) { } // composer dir if (is_dir(BB_ROOT . 'vendor')) { - rmdir_rec(BB_ROOT . 'vendor'); + removeDir(BB_ROOT . 'vendor'); if (!is_dir(BB_ROOT . 'vendor')) { out("- Composer directory successfully removed!"); } else { diff --git a/library/includes/functions_cli.php b/library/includes/functions_cli.php index 37864e20a..7fbd15001 100644 --- a/library/includes/functions_cli.php +++ b/library/includes/functions_cli.php @@ -117,27 +117,6 @@ function runProcess(string $cmd, string $input = null): void proc_close($process); } -/** - * Remove directory recursively - * - * @param string $dir - * @return void - */ -function rmdir_rec(string $dir): void -{ - $it = new RecursiveDirectoryIterator($dir, FilesystemIterator::SKIP_DOTS); - $files = new RecursiveIteratorIterator($it, - RecursiveIteratorIterator::CHILD_FIRST); - foreach ($files as $file) { - if ($file->isDir()) { - rmdir($file->getPathname()); - } else { - unlink($file->getPathname()); - } - } - rmdir($dir); -} - /** * Setting permissions recursively *