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:
parent
4b9a8a4e37
commit
742e0d5c9b
@ -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());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user