Commit 93dd6e34 authored by Rahix's avatar Rahix
Browse files

Merge 'fix-menu' into 'master'

Exclude files starting with a . from the menu (e.g. macOS created apple double
files).  Otherwise when copying stuff with mac finder, non-functional entries
prefixed with `._` appear.

See merge request card10/firmware!168
parents 2c60241a dbd06c92
......@@ -62,14 +62,18 @@ 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 +89,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(
[
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment