Skip to content

Commit

Permalink
remove ressources if no demon
Browse files Browse the repository at this point in the history
  • Loading branch information
Hotfirenet committed Dec 18, 2024
1 parent 02abede commit ae68ce8
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions plugin_info/configurationHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,16 @@ function processDirectories($directories, $newId) {

$dataJson['hasOwnDeamon'] = true;
echo "La prise en compte du démon est activée.\n";
}

} else {
echo "Suppression du repertoire démon.\n";
$demonDirectory = __DIR__ . '/../resources';
$files = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($demonDirectory));
foreach ($files as $file) {
if ($file->isFile()) {
unlink($file->getRealPath());
}
}
}

echo "Votre plugin possede t-il des dépendances ? (oui/non) : ";
$dependancyResponse = trim(fgets(STDIN));
Expand Down

0 comments on commit ae68ce8

Please sign in to comment.