Improved compatibility

This commit is contained in:
Julian Prieber 2023-05-25 17:34:09 +02:00
parent a78d471374
commit d1d1e86993
1 changed files with 5 additions and 32 deletions

View File

@ -489,38 +489,12 @@ public function SendTestMail(Request $request)
function removeFolder($folderName)
{
if (is_dir($folderName))
$folderHandle = opendir($folderName);
if (!$folderHandle)
return false;
while ($file = readdir($folderHandle)) {
if ($file != "." && $file != "..") {
if (!is_dir($folderName . "/" . $file))
unlink($folderName . "/" . $file);
else
removeFolder($folderName . '/' . $file);
}
if (File::exists($folderName)) {
File::deleteDirectory($folderName);
return true;
}
closedir($folderHandle);
rmdir($folderName);
return false;
}
removeFolder($folderName);
@ -621,7 +595,6 @@ public function SendTestMail(Request $request)
}
}
return Redirect('/studio/theme');
}