sub (/src/:job) {
return NOT_FOUND if !job;
- forbid job->private || job->problem->private || job->contest && job->contest->private;
+ forbid job->private || job->problem->private || job->contest && job->contest->is_running;
my @headers = ('X-Forever' => 1, 'Cache-Control' => 'public, max-age=604800', 'Content-Type' => CONTENT_TYPES->{job->format});
[200, \@headers, [job->source]]
},
unlink $prog->path if $prog;
my $newjob = db->jobs->create({
maybe contest => $_{contest},
- maybe private => problem->private,
+ maybe private => problem->private && !$_{contest},
date => time,
extension => FORMAT_EXTENSION->{$_{prog_format}},
format => $_{prog_format},