Update functions.php

This commit is contained in:
FusionPBX 2019-10-15 13:48:22 -06:00 committed by GitHub
parent 70e550ea72
commit b062593cb2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -205,11 +205,11 @@
}
if (!function_exists('recursive_delete')) {
if (file_exists('/bin/rm')) {
if (file_exists('/usr/bin/find')) {
function recursive_delete($directory) {
if (isset($directory) && strlen($directory) > 8) {
exec ('find '.$directory.' -name "*" | xargs rm -Rf');
//exec ('rm -Rf '.$directory.'/*');
exec('/usr/bin/find '.$directory.' -name "*" -delete');
//exec('rm -Rf '.$directory.'/*');
clearstatcache();
}
}