Skip to content
Snippets Groups Projects
Commit 8bbe30cc authored by dom's avatar dom
Browse files

fix(menu): exclude files starting with a . from the menu (e.g. macOS created apple double files)

parent 4d77b5c4
No related branches found
No related tags found
1 merge request!168fix(menu): exclude files starting with a . from the menu (e.g. macOS created apple double files)
This commit is part of merge request !168. Comments created here will be created in the context of that merge request.
......@@ -62,14 +62,17 @@ def list_apps():
]
)
dirlist = [entry for entry in sorted(os.listdir("/apps")) if not entry.startswith(".")]
# list all hatchary style apps (not .elf and not .py)
# with or without metadata.json
for appFolder in sorted(os.listdir("/apps")):
for appFolder in dirlist:
if not (appFolder.endswith(".py") or appFolder.endswith(".elf")):
apps.append(["/apps/%s/__init__.py" % appFolder, read_metadata(appFolder)])
# list simple python scripts
for pyFile in sorted(os.listdir("/apps")):
for pyFile in dirlist:
if pyFile.endswith(".py"):
apps.append(
[
......@@ -85,7 +88,7 @@ def list_apps():
)
# list simple elf binaries
for elfFile in sorted(os.listdir("/apps")):
for elfFile in dirlist:
if elfFile.endswith(".elf"):
apps.append(
[
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment