diff options
| author | Florian Fischer <florian.fischer@muhq.space> | 2026-02-10 14:51:24 +0100 |
|---|---|---|
| committer | Florian Fischer <florian.fischer@muhq.space> | 2026-02-10 14:51:24 +0100 |
| commit | bdf2c622f17a4b626e0953c48fd2cb80f8911a3b (patch) | |
| tree | a39ac352c29b681d5458e15e86ccc45ec550b6bb /generate-gallery.py | |
| parent | 96373c6d93f0c310f8b777494c5a40c27fd78a0b (diff) | |
| download | scratch-gallery-bdf2c622f17a4b626e0953c48fd2cb80f8911a3b.tar.gz scratch-gallery-bdf2c622f17a4b626e0953c48fd2cb80f8911a3b.zip | |
skip empty project dirs
Diffstat (limited to 'generate-gallery.py')
| -rwxr-xr-x | generate-gallery.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/generate-gallery.py b/generate-gallery.py index 454d093..1b4f639 100755 --- a/generate-gallery.py +++ b/generate-gallery.py @@ -48,10 +48,10 @@ def load_projects(root: str) -> dict: """Load all game meta data from the games directory""" projects = {} - for _parent, _, files in os.walk(root): + for _parent, dirs, files in os.walk(root): parent = pathlib.Path(_parent) scope = nested_get(projects, parent.parts[1:]) - if scope is None: + if scope is None and len(dirs): scope = {} nested_set(projects, parent.parts[1:], scope) |
