[appimage] fix: info dialog is displaying attributes related to the installation after the application has been removed (search)

This commit is contained in:
Vinicius Moreira
2022-03-11 09:38:53 -03:00
parent 94ba539eb3
commit 166b5721bb
2 changed files with 9 additions and 1 deletions

View File

@@ -44,7 +44,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- General - General
- not accepting blank root passwords [#235](https://github.com/vinifmor/bauh/issues/235) - not accepting blank root passwords [#235](https://github.com/vinifmor/bauh/issues/235)
- human-readable sizes (packages, files, updates, ...) - human-readable sizes (packages, files, updates, ...)
- AppImage
- info: displaying attributes related to the installation after the application has been removed (search)
- UI - UI
- some package icons would not appear if there is no URL associated with them - some package icons would not appear if there is no URL associated with them

View File

@@ -419,6 +419,11 @@ class AppImageManager(SoftwareManager):
def get_info(self, pkg: AppImage) -> dict: def get_info(self, pkg: AppImage) -> dict:
data = pkg.get_data_to_cache() data = pkg.get_data_to_cache()
if not pkg.installed:
for key in ('install_dir', 'symlink', 'icon_path'):
if key in data:
del data[key]
if data.get('url_download'): if data.get('url_download'):
size = self.http_client.get_content_length(data['url_download']) size = self.http_client.get_content_length(data['url_download'])
if size: if size: