We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f46719c commit 1f7743cCopy full SHA for 1f7743c
2 files changed
teachprogramming/lib/api.py
@@ -76,7 +76,7 @@ def on_get(self, request, response, project_name: str):
76
def project_files(self, project_name: str) -> Iterable[Path]:
77
def _filter_file(f):
78
relative_path = f.relative_to(self.file_collection.path)
79
- return project_name == str(relative_path.parent.joinpath(relative_path.name.removesuffix(''.join(f.suffixes))))
+ return str(relative_path.parent.joinpath(relative_path.name.removesuffix(''.join(f.suffixes)))).startswith(project_name)
80
return tuple(filter(_filter_file, self.file_collection.files))
81
82
…c/projects/game/animation_base_pygame.py …c/projects/game/animation_base.pygame.pyteachprogramming/static/projects/game/animation_base_pygame.py renamed to teachprogramming/static/projects/game/animation_base.pygame.py
0 commit comments