Skip to content

Commit

Permalink
fix: Program names and empty program entry
Browse files Browse the repository at this point in the history
  • Loading branch information
koplo199 authored and orowith2os committed Aug 29, 2023
1 parent 5590eec commit 6255588
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions bottles/backend/managers/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -707,7 +707,7 @@ def get_programs(self, config: BottleConfig) -> List[dict]:
skip if the path contains the "Uninstall" word.
'''
executable_path = LnkUtils.get_data(program)
if executable_path is None:
if executable_path in [None, ""]:
continue
executable_name = executable_path.split("\\")[-1]
program_folder = ManagerUtils.get_exe_parent_dir(config, executable_path)
Expand All @@ -727,13 +727,12 @@ def get_programs(self, config: BottleConfig) -> List[dict]:
bottle,
executable_path.replace("C:\\", "drive_c\\").replace("\\", "/")
)

if os.path.exists(path_check):
if executable_name not in found:
installed_programs.append({
"executable": executable_name,
"arguments": "",
"name": executable_name.split(".")[0],
"name": executable_name.rsplit('.',1)[0],
"path": executable_path,
"folder": program_folder,
"icon": "com.usebottles.bottles-program",
Expand Down

0 comments on commit 6255588

Please sign in to comment.