Skip to content

Commit

Permalink
Delete only if exist
Browse files Browse the repository at this point in the history
  • Loading branch information
wincelau committed Oct 13, 2024
1 parent d0111fe commit 1dd10cb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app.php
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,9 @@ 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);
}
Expand Down

0 comments on commit 1dd10cb

Please sign in to comment.