make cleanup of media more robust
This commit is contained in:
parent
36cb0180cf
commit
7d1cd83e3a
1 changed files with 3 additions and 1 deletions
|
|
@ -187,7 +187,9 @@
|
|||
catch(\hhu\z\exceptions\FileCopyException $e) {
|
||||
// Cleanup
|
||||
foreach($copiedFiles as $filename) {
|
||||
unlink($filename);
|
||||
if(file_exists($filename)) {
|
||||
unlink($filename);
|
||||
}
|
||||
}
|
||||
throw $e;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue