diff --git a/Command/CoreCommand.php b/Command/CoreCommand.php index 2bca74f..e4649af 100644 --- a/Command/CoreCommand.php +++ b/Command/CoreCommand.php @@ -165,7 +165,7 @@ private function matchCronField(string $expr, $value, int $min, int $max, ?array public function initAction() { // Initialize the framework - $this->Helper->Core->init(); + $this->Helper->Core->init(true); } /** diff --git a/Helper/CoreHelper.php b/Helper/CoreHelper.php index c8c9fa1..cb5f175 100644 --- a/Helper/CoreHelper.php +++ b/Helper/CoreHelper.php @@ -25,7 +25,7 @@ public function init(bool $force = false): bool // Path to file $htaccess = $CONFIG->root() . DIRECTORY_SEPARATOR . ".htaccess"; - // Check if the file exist + // Check if the file exist and we want to force the creation if($force && is_file($htaccess)) { // Delete file @@ -82,6 +82,13 @@ public function init(bool $force = false): bool // Path to file $webroot = $CONFIG->root() . DIRECTORY_SEPARATOR . "webroot"; + // Check if the directory exist and we want to force the creation + if($force && is_dir($webroot)) { + + // Delete file + $this->delete($webroot); + } + // Check if directory exists if(!is_dir($webroot) && !is_file($webroot) && !is_link($webroot)) { diff --git a/VERSION b/VERSION index 2fcb726..6c2b1cd 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -v0.0.70 +v0.0.71