Use the recursive_delete function

This commit is contained in:
FusionPBX
2026-02-28 22:50:27 -07:00
committed by GitHub
parent 7d1ab4a64f
commit 3f838dd951
2 changed files with 4 additions and 2 deletions
+2 -1
View File
@@ -245,7 +245,8 @@
exec('sox --ignore-length '.escapeshellarg($recording_path.'/'.$recording_filename).' '.escapeshellarg($recording_path.'/'.$recording_filename_temp));
}
if (file_exists($recording_path.'/'.$recording_filename_temp)) {
exec('rm -f '.escapeshellarg($recording_path.'/'.$recording_filename).' && mv '.escapeshellarg($recording_path.'/'.$recording_filename_temp).' '.escapeshellarg($recording_path.'/'.$recording_filename));
recursive_delete($recording_path.'/'.$recording_filename);
exec('mv '.escapeshellarg($recording_path.'/'.$recording_filename_temp).' '.escapeshellarg($recording_path.'/'.$recording_filename));
}
unset($recording_filename_temp);
}