Skip to content

Commit

Permalink
Remove duplication
Browse files Browse the repository at this point in the history
The cleanup which was done for the error is the same as the default cleanup, so error out later after the normal cleanup.
  • Loading branch information
Michael Vasseur committed Oct 1, 2023
1 parent 1b358ee commit 4e951e9
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions webapp/src/Service/ExternalContestSourceService.php
Original file line number Diff line number Diff line change
Expand Up @@ -1504,16 +1504,6 @@ protected function importSubmission(string $entityType, ?string $eventId, string
$this->addOrUpdateWarning($eventId, $entityType, $data['id'], ExternalSourceWarning::TYPE_SUBMISSION_ERROR, [
'message' => 'Cannot add submission: ' . $message,
]);
// Clean up the temporary submission files.
foreach ($filesToSubmit as $file) {
unlink($file->getRealPath());
}
if (isset($zip)) {
$zip->close();
}
if ($shouldUnlink) {
unlink($zipFile);
}
return;
}

Check failure on line 1509 in webapp/src/Service/ExternalContestSourceService.php

View workflow job for this annotation

GitHub Actions / phpcs

Blank line found at end of control structure
Expand Down

0 comments on commit 4e951e9

Please sign in to comment.