1 Commits

Author SHA1 Message Date
Julian Freeman
2c007e1ad0 fix no info.plist bug 2024-02-04 20:48:51 -04:00
2 changed files with 3 additions and 3 deletions

View File

@@ -7,7 +7,7 @@ from mw_dailycheck import MwDailyCheck
import daily_check_rc import daily_check_rc
version = (1, 0, 0) version = (1, 0, 1)
ORG_NAME = "JnPrograms" ORG_NAME = "JnPrograms"
APP_NAME = "DailyCheck" APP_NAME = "DailyCheck"

View File

@@ -50,7 +50,7 @@ def get_mac_installed_software() -> dict[str, str]:
def search(path: Path): def search(path: Path):
for c in path.glob("*"): for c in path.glob("*"):
if str(c).endswith(".app"): if str(c).endswith(".app"):
if c.is_dir(): if c.is_dir() and (c / "Contents" / "Info.plist").exists():
all_soft.append(c) all_soft.append(c)
elif c.is_dir(): elif c.is_dir():
search(c) search(c)
@@ -61,6 +61,6 @@ def get_mac_installed_software() -> dict[str, str]:
all_soft.sort(key=lambda x: x.name.lower()) all_soft.sort(key=lambda x: x.name.lower())
return { return {
app.name: get_app_icon_path(Path(app) / "Contents" / "Info.plist") app.name: get_app_icon_path(app / "Contents" / "Info.plist")
for app in all_soft for app in all_soft
} }