From abfeb4575ec8996aa855c15d72eec80efd689283 Mon Sep 17 00:00:00 2001
From: Peter Eckel <pe-git@hindenburgring.com>
Date: Thu, 22 Aug 2019 13:14:38 +0200
Subject: [PATCH] Ignore macOS meta files in menu.py

---
 preload/menu.py | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/preload/menu.py b/preload/menu.py
index 94462132..06ae20f5 100644
--- a/preload/menu.py
+++ b/preload/menu.py
@@ -65,12 +65,14 @@ def list_apps():
     # list all hatchary style apps (not .elf and not .py)
     # with or without metadata.json
     for appFolder in sorted(os.listdir("/apps")):
-        if not (appFolder.endswith(".py") or appFolder.endswith(".elf")):
+        if not (appFolder.endswith(".py")
+                or appFolder.endswith(".elf")
+                or appFolder.startswith("._")):
             apps.append(["/apps/%s/__init__.py" % appFolder, read_metadata(appFolder)])
 
     # list simple python scripts
     for pyFile in sorted(os.listdir("/apps")):
-        if pyFile.endswith(".py"):
+        if pyFile.endswith(".py") and not pyFile.startswith("._"):
             apps.append(
                 [
                     "/apps/%s" % pyFile,
@@ -86,7 +88,7 @@ def list_apps():
 
     # list simple elf binaries
     for elfFile in sorted(os.listdir("/apps")):
-        if elfFile.endswith(".elf"):
+        if elfFile.endswith(".elf") and not elfFile.startswith("._"):
             apps.append(
                 [
                     "/apps/%s" % elfFile,
-- 
GitLab