make cleanup of media more robust

This commit is contained in:
oliver 2015-05-17 20:53:43 +02:00
commit f5bdd3bf1a

View file

@ -187,7 +187,9 @@
catch(\hhu\z\exceptions\FileCopyException $e) { catch(\hhu\z\exceptions\FileCopyException $e) {
// Cleanup // Cleanup
foreach($copiedFiles as $filename) { foreach($copiedFiles as $filename) {
unlink($filename); if(file_exists($filename)) {
unlink($filename);
}
} }
throw $e; throw $e;
} }