Skip to content
Snippets Groups Projects

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

Merged (deleted) requested to merge monkeydom/firmware:master into master
1 file
+ 6
3
Compare changes
  • Side-by-side
  • Inline
+ 6
3
@@ -62,14 +62,17 @@ def list_apps():
@@ -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)
# list all hatchary style apps (not .elf and not .py)
# with or without metadata.json
# 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")):
if not (appFolder.endswith(".py") or appFolder.endswith(".elf")):
apps.append(["/apps/%s/__init__.py" % appFolder, read_metadata(appFolder)])
apps.append(["/apps/%s/__init__.py" % appFolder, read_metadata(appFolder)])
# list simple python scripts
# list simple python scripts
for pyFile in sorted(os.listdir("/apps")):
for pyFile in dirlist:
if pyFile.endswith(".py"):
if pyFile.endswith(".py"):
apps.append(
apps.append(
[
[
@@ -85,7 +88,7 @@ def list_apps():
@@ -85,7 +88,7 @@ def list_apps():
)
)
# list simple elf binaries
# list simple elf binaries
for elfFile in sorted(os.listdir("/apps")):
for elfFile in dirlist:
if elfFile.endswith(".elf"):
if elfFile.endswith(".elf"):
apps.append(
apps.append(
[
[
Loading