From 2c007e1ad007d6cf2a1200d28cb61d3d1a25188a Mon Sep 17 00:00:00 2001 From: Julian Freeman Date: Sun, 4 Feb 2024 20:48:51 -0400 Subject: [PATCH] fix no info.plist bug --- main.py | 2 +- util_func.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/main.py b/main.py index 16da6ff..07c24dd 100644 --- a/main.py +++ b/main.py @@ -7,7 +7,7 @@ from mw_dailycheck import MwDailyCheck import daily_check_rc -version = (1, 0, 0) +version = (1, 0, 1) ORG_NAME = "JnPrograms" APP_NAME = "DailyCheck" diff --git a/util_func.py b/util_func.py index c58f7c4..5ba9699 100644 --- a/util_func.py +++ b/util_func.py @@ -50,7 +50,7 @@ def get_mac_installed_software() -> dict[str, str]: def search(path: Path): for c in path.glob("*"): if str(c).endswith(".app"): - if c.is_dir(): + if c.is_dir() and (c / "Contents" / "Info.plist").exists(): all_soft.append(c) elif c.is_dir(): search(c) @@ -61,6 +61,6 @@ def get_mac_installed_software() -> dict[str, str]: all_soft.sort(key=lambda x: x.name.lower()) 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 }