Skip to content

Commit 7175113

Browse files
meisterTnickygerritsen
authored andcommitted
Also search in the new place for the output validator.
1 parent 3006ead commit 7175113

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

webapp/src/Service/ImportProblemService.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -896,9 +896,11 @@ private function searchAndAddValidator(ZipArchive $zip, ?array &$messages, strin
896896
$validatorFiles = [];
897897
for ($i = 0; $i < $zip->numFiles; $i++) {
898898
$filename = $zip->getNameIndex($i);
899-
if (Utils::startsWith($filename, 'output_validators/') &&
900-
!Utils::endsWith($filename, '/')) {
901-
$validatorFiles[] = $filename;
899+
foreach (['output_validators/', 'output_validator'] as $dir) {
900+
if (Utils::startsWith($filename, $dir) &&
901+
!Utils::endsWith($filename, '/')) {
902+
$validatorFiles[] = $filename;
903+
}
902904
}
903905
}
904906
if (sizeof($validatorFiles) == 0) {

0 commit comments

Comments
 (0)