Skip to content

Commit 26beb2a

Browse files
committed
Handle the case with missing file for symlink
1 parent 09ac7d3 commit 26beb2a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

webapp/src/Service/DOMJudgeService.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1568,6 +1568,9 @@ public function getScoreboardZip(
15681568
$publicPath = realpath(sprintf('%s/public/', $this->projectDir));
15691569
foreach ($assetMatches[1] as $file) {
15701570
$filepath = realpath($publicPath . '/' . $file);
1571+
if ($filepath === false) {
1572+
throw new Exception("Could not find (possibly symlinked) file: " . $file . ", at: " . $publicPath);
1573+
}
15711574
if (!str_starts_with($filepath, $publicPath) &&
15721575
!str_starts_with($filepath, $this->vendorDir)
15731576
) {

0 commit comments

Comments
 (0)