fix: ignore '.gitkeep' or any file whose name begins with a dot

This commit is contained in:
OniriCorpe 2024-03-13 03:13:12 +01:00 committed by OniriCorpe
parent f240859eb5
commit 63c5eac29b

View file

@ -87,9 +87,9 @@ def generate_READMEs(app_path: Path):
# only pick files (no folder) on the root of 'screenshots'
for entry in os.scandir(os.path.join(app_path, "doc", "screenshots")):
if os.DirEntry.is_file(entry):
# ignore '.gitkeep' or any file whose name begins with a dot
if not entry.name.startswith("."):
screenshots.append(os.path.relpath(entry.path, app_path))
if ".gitkeep" in screenshots:
screenshots.remove(".gitkeep")
disclaimer: Optional[str]
if (app_path / "doc" / f"DISCLAIMER{lang_suffix}.md").exists():