aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fischer@muhq.space>2026-02-10 14:51:24 +0100
committerFlorian Fischer <florian.fischer@muhq.space>2026-02-10 14:51:24 +0100
commitbdf2c622f17a4b626e0953c48fd2cb80f8911a3b (patch)
treea39ac352c29b681d5458e15e86ccc45ec550b6bb
parent96373c6d93f0c310f8b777494c5a40c27fd78a0b (diff)
downloadscratch-gallery-bdf2c622f17a4b626e0953c48fd2cb80f8911a3b.tar.gz
scratch-gallery-bdf2c622f17a4b626e0953c48fd2cb80f8911a3b.zip
skip empty project dirs
-rwxr-xr-xgenerate-gallery.py4
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)