Skip to content

Commit

Permalink
Removed custom directory remove behavior.
Browse files Browse the repository at this point in the history
  • Loading branch information
Severino committed Jul 24, 2024
1 parent e92d532 commit 26a3cca
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 13 deletions.
6 changes: 5 additions & 1 deletion app/Plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,11 @@ public function handleRemove() {
}

$this->removePreferences();
sp_remove_dir(base_path("app/Plugins/$this->name"));

$pluginDir = base_path("app/Plugins/$this->name");
if(File::exists($pluginDir)) {
File::deleteDirectory($pluginDir);
}

$this->delete();
}
Expand Down
12 changes: 0 additions & 12 deletions app/helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,6 @@
use Illuminate\Support\Facades\Schema;
use Illuminate\Support\Facades\Storage;

if(!function_exists('sp_remove_dir')) {
function sp_remove_dir($dir) {
foreach(glob("{$dir}/*") as $file) {
if(is_dir($file)) {
sp_remove_dir($file);
} else if(!is_link($file)) {
unlink($file);
}
}
rmdir($dir);
}
}

if(!function_exists('sp_slug')) {
function sp_slug($str) {
Expand Down

0 comments on commit 26a3cca

Please sign in to comment.