1
0
Fork 0
mirror of https://github.com/24eme/signaturepdf synced 2026-03-14 13:55:44 +01:00

Delete only if exist

This commit is contained in:
Vincent LAURENT 2024-10-13 11:18:07 +02:00
commit 1dd10cb8f3

View file

@ -361,7 +361,9 @@ $f3->route('GET /cron', function($f3) {
}
$expiredFolder = str_replace('.expire', '', $expireFile);
array_map('unlink', glob($expiredFolder."/*"));
unlink($expiredFolder.'/.lock');
if(file_exists($expiredFolder.'/.lock')) {
unlink($expiredFolder.'/.lock');
}
rmdir($expiredFolder);
unlink($expireFile);
}