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:
parent
d0111fe70e
commit
1dd10cb8f3
1 changed files with 3 additions and 1 deletions
4
app.php
4
app.php
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue