mirror of
https://github.com/spalencsar/bearhub.git
synced 2026-07-06 22:54:16 +02:00
[appimage] improvement: faster reading of installed applications
This commit is contained in:
@@ -254,11 +254,11 @@ class AppImageManager(SoftwareManager):
|
||||
res = SearchResult(installed_apps, [], 0)
|
||||
|
||||
if os.path.exists(INSTALLATION_DIR):
|
||||
installed = run_cmd(f'ls {INSTALLATION_DIR}/*/data.json', print_error=False)
|
||||
installed = glob.glob(f'{INSTALLATION_DIR}/*/data.json')
|
||||
|
||||
if installed:
|
||||
names = set()
|
||||
for path in installed.split('\n'):
|
||||
for path in installed:
|
||||
if path:
|
||||
with open(path) as f:
|
||||
app = AppImage(installed=True, i18n=self.i18n, custom_actions=self.custom_app_actions, **json.loads(f.read()))
|
||||
|
||||
Reference in New Issue
Block a user