Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions problemtools/verifyproblem.py
Original file line number Diff line number Diff line change
Expand Up @@ -1734,7 +1734,7 @@ def _recompute_jobs(self) -> None:


class Submissions(ProblemPart):
_SUB_REGEXP = re.compile(r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*[a-zA-Z0-9](\.c\+\+)?$')
_SUB_REGEXP = re.compile(r'^[a-zA-Z0-9_][a-zA-Z0-9_.-]*[a-zA-Z0-9](\.c\+\+)?$')
# (verdict, directory, required)
_VERDICTS: list[tuple[Verdict, str, bool]] = [
('AC', 'accepted', True),
Expand Down Expand Up @@ -2091,8 +2091,8 @@ def _check_symlinks(self):
)

def _check_file_and_directory_names(self):
filename_regex = re.compile(r'^[a-z0-9][a-z0-9_.-]{0,253}[a-z0-9]$', re.I)
directory_regex = re.compile(r'^[a-z0-9]([a-z0-9_-]{0,253}[a-z0-9])?$', re.I)
filename_regex = re.compile(r'^[a-z0-9_][a-z0-9_.-]{0,253}[a-z0-9]$', re.I)
directory_regex = re.compile(r'^[a-z0-9_]([a-z0-9_-]{0,253}[a-z0-9])?$', re.I)

# Adding some pragmatic custom rules until https://github.com/Kattis/problem-package-format/issues/453 has resolved
def _special_case_allowed_files(file: str, reldir: str) -> bool:
Expand Down