Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Jannis Rieger
firmware
Commits
dbd06c92
Commit
dbd06c92
authored
Aug 22, 2019
by
Dominik Wagner
Committed by
Rahix
Aug 22, 2019
Browse files
fix(menu): Exclude files starting with a .
parent
2c60241a
Changes
1
Hide whitespace changes
Inline
Side-by-side
preload/menu.py
View file @
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
(
[
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment