1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 13:12:50 +01:00

Clean up for self updater

This commit is contained in:
David Bomba 2022-06-16 13:07:53 +10:00
parent 4b9a8a4e37
commit 742e0d5c9b

View File

@ -203,15 +203,15 @@ class SelfUpdateController extends BaseController
foreach ($iterator as $file)
{
if($file->isDir() && !$file->isDot() && ($current_revision_text != $file->getFileName()))
{
$directoryIterator = new \RecursiveDirectoryIterator(base_path('vendor/beganovich/snappdf/versions/'.$file->getFileName()), \RecursiveDirectoryIterator::SKIP_DOTS);
foreach (new \RecursiveIteratorIterator($directoryIterator) as $filex)
if($file->isDir() && !$file->isDot() && ($current_revision_text != $file->getFileName()))
{
unlink($filex->getPathName());
}
$directoryIterator = new \RecursiveDirectoryIterator(base_path('vendor/beganovich/snappdf/versions/'.$file->getFileName()), \RecursiveDirectoryIterator::SKIP_DOTS);
foreach (new \RecursiveIteratorIterator($directoryIterator) as $filex)
{
unlink($filex->getPathName());
}
}