Skip to content

Commit 45e683c

Browse files
committed
Check file existence instead of asset array
Fix the disk backlog during scoreboard pictures rendering.
1 parent 74a851b commit 45e683c

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

webapp/src/Service/DOMJudgeService.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1386,9 +1386,8 @@ public function assetPath(?string $name, string $type, bool $fullPath = false, ?
13861386
}
13871387

13881388
if (isset($dir)) {
1389-
$assets = $this->getAssetFiles($dir);
13901389
foreach (static::MIMETYPE_TO_EXTENSION as $extension) {
1391-
if ($forceExtension === $extension || (!$forceExtension && in_array($name . '.' . $extension, $assets))) {
1390+
if ($forceExtension === $extension || (!$forceExtension && file_exists($dir . '/' . $name . '.' . $extension))) {
13921391
return sprintf('%s%s/%s.%s', $prefix, $dir, $name, $extension);
13931392
}
13941393
}

0 commit comments

Comments
 (0)